From David.Epstein at warwick.ac.uk  Tue Apr 19 22:59:44 2011
From: David.Epstein at warwick.ac.uk (David.Epstein)
Date: Tue, 19 Apr 2011 13:59:44 -0700 (PDT)
Subject: [Rd] Sweave tokens not in column 1: enhancement request
Message-ID: <1303246784050-3461527.post@n4.nabble.com>

When I re-use a code chunk in Sweave, together with keep.source=TRUE, I would
like to follow usual programming conventions in which the amount of white
space on the left indicates logical structure. It seems that one can't do
this in Sweave, or am I wrong?

for (i in ind) {
    do such-and-such and then
    <<code chunk 20>>
    do something-else
}

Sweave will say that << is an error. Would it be difficult to change Sweave
so that formatting in the conventional way becomes possible? I'm thinking
both of the .Rnw file and of the final output in the .pdf or .ps file.

Thanks
David

--
View this message in context: http://r.789695.n4.nabble.com/Sweave-tokens-not-in-column-1-enhancement-request-tp3461527p3461527.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] Sweave tokens not in column 1: enhancement request
David.Epstein