[R] Sweave, white space and code blocks

David.Epstein David.Epstein at warwick.ac.uk
Mon Mar 21 16:08:41 CET 2011

Sweave is very useful, and I'm gradually getting used to it.

I've just been battling Sweave over the re-use of code chunks. As I am
pretty ignorant in the byways of both Sweave and R, this took a chunk of
time to sort out. Here is what I learned:

If one re-uses a code chunk, then Sweave (but not Stangle) will insist that
start in column 1. In particular, white space to its left is not allowed.

I can't find any mention of this in the Sweave manual, nor in the Sweave
FAQ. I'm planning to ask for this to be included in the Sweave FAQ, as it
has certainly been frequently asked by me today.


View this message in context: http://r.789695.n4.nabble.com/Sweave-white-space-and-code-blocks-tp3393811p3393811.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list