Created attachment 1158 [details]
Process with Sweave("test01", keep.source=TRUE)
The only effect of 'keep.source=TRUE' is that, in my tests at least, the effect of a comment line is that an NA appears after the immediately following line of code. The code is reformatted.
Created attachment 1159 [details]
Process with Sweave("test00")
Includes the line
The bug has been reproduced both under MacOS X and under Windows
and R version 2.13.0 Under development (unstable), e.g., (2010-12-07 r53804)]
Attachment 1158 [details], if processed with Sweave("test01", keep.source=TRUE), generates essentially the
same result as attachment 1159 [details] when processed with Sweave("test00").
Here is the output in the first case
%% Sweave("test01", keep.source=TRUE)
%% Compare with Sweave("test01")
> print(sapply(trees, range))
Girth Height Volume
[1,] 8.3 63 10.2
[2,] 20.6 87 77.0
> print(sapply(women, range))
[1,] 58 115
[2,] 72 164
I can reproduce this. The trigger is using the name "test01", rather than the full filename "test01.Rnw". Will fix. In the meantime, the workaround is to use the filename with extension.
Fixed in R-devel and R-patched, as of r53867
(spam comment removed)