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

From: David.Epstein <David.Epstein_at_warwick.ac.uk>
Date: Tue, 19 Apr 2011 13:59:44 -0700 (PDT)

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.


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.

R-devel_at_r-project.org mailing list
Received on Tue 19 Apr 2011 - 21:15:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 20 Apr 2011 - 16:50:49 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive