[R] Continuation string in Sweave

Friedrich.Leisch@univie.ac.at Friedrich.Leisch at univie.ac.at
Thu Apr 3 14:45:23 CEST 2003


>>>>> On Wed, 2 Apr 2003 15:57:58 +0200,
>>>>> Søren Højsgaard (SH) wrote:

  > Dear all,
  > In Sweave I have a code chunk
  > aaa <- "Sex, Drug/Sex:W1,Drug:W1,\
  >     Sex:W2,Drug:W2/Sex:W1:W2,Drug:W1:W2"
  > which in tex code turns into
  > \begin{Sinput}
  >> aaa <- "Sex, Drug/Sex:W1,Drug:W1,\n    Sex:W2,Drug:W2/Sex:W1:W2,Drug:W1:W2"
  > \end{Sinput}
  > meaning that the string is not split to two lines. Any suggestion about how to make Sweave break the string ?


Currently there is no way: Sweave operates on the *parsed* expressions
which do not contain the newlines. It does respect options(width=...)
settings, hence you can control approximately where lines are broken
(but not exactly).

Hope this helps,
Fritz

-- 
-------------------------------------------------------------------
                        Friedrich Leisch 
Institut für Statistik & DSS                Tel: (+43 1) 4277 38613
Universität Wien  		            Fax: (+43 1) 4277 38639
Universitätsstraße 5                  Friedrich.Leisch at univie.ac.at
1010 Wien, Austria     http://mailbox.univie.ac.at/Friedrich.Leisch
-------------------------------------------------------------------



More information about the R-help mailing list