Hi:
I have a template preamble file for Sweave; near the bottom, I put in this commented code some time ago so I would never forget it: %% ------------------------------------------------------------------ %% IMPORTANT NOTE!!!! %% All Sweave tokens MUST begin in column 1 or they will be ignored %% by Sweave. %% ------------------------------------------------------------------ Dennis On Mon, Mar 21, 2011 at 8:08 AM, David.Epstein <david.epst...@warwick.ac.uk>wrote: > 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. > > David > > -- > 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. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.