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 set \SweaveOpts{keep.source=TRUE} to tell Sweave not to
"reshape" your R code.

2. You need to customize sweave.module (the font size of R code is
defined there).

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA



On Tue, Oct 11, 2011 at 10:21 AM, Shane Siers <shanesi...@gmail.com> 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
> command lines with carriage returns works in R but not in Sweave.
>
> How can I get the R commands to wrap (preferably with an indent for wrapped
> lines) in the PDF output?
>
> Also, can I get the LyX interface display of Sweave chunks to default to a
> smaller text size?
>
> --
> Shane
>
>

Reply via email to