Re: Wrapping text for R commands in Sweave

2011-10-16 Thread Liviu Andronic
On Tue, Oct 11, 2011 at 5:21 PM, Shane Siers wrote: > Hello, friends.  My problem: > > Many R commands are too long for a single line.  Lyx will wrap the text in > the GUI, but the PDF output runs off the edge of the page.  Breaking up > As a general rule, the way LyX wraps up text in the GUI has

Re: Wrapping text for R commands in Sweave

2011-10-11 Thread Yihui Xie
keep.source=TRUE will preserve your line breaks in Sweave, so I do not understand what was going on in your LyX and Sweave; are you sure you have carriage returns in the R code in LyX? Your description does not seem to be clear enough to me, since you mentioned "LyX will wrap R code" (which means t

Re: Wrapping text for R commands in Sweave

2011-10-11 Thread Shane Siers
Alas, I have keep.source=TRUE to retain my #Comments for collaborator reference. Is there an alternate way to keep comments while setting keep.source=FALSE? Thanks again, Shane On Tue, Oct 11, 2011 at 9:42 AM, Yihui Xie wrote: > 1. the width of output of R code depends on options('width') when

Re: Wrapping text for R commands in Sweave

2011-10-11 Thread Yihui Xie
1. the width of output of R code depends on options('width') when Sweave option is \SweaveOpts{keep.source=FALSE} (this is default before R 2.14), so you may need to set width to a smaller value, say, options(width = 60), in the beginning of your document (probably as a hidden code chunk). Or you

Wrapping text for R commands in Sweave

2011-10-11 Thread Shane Siers
Hello, friends. My problem: Many R commands are too long for a single line. Lyx will wrap the text in the GUI, but the PDF output runs off the edge of the page. Breaking up command lines with carriage returns works in R but not in Sweave. How can I get the R commands to wrap (preferably with a