[R] Sweave : some comments disappear

Remko Duursma remkoduursma at gmail.com
Tue Sep 6 07:35:59 CEST 2011


Dear R-helpers,


when I have an R code chunk in a sweave file like this:

<<>>=
x <- 1:10

# this comment disapears
x

# this one does not!
print(x)

#mean
mean(x)
@

The first comment does not appear in the sweaved document, the second
one does. How can this be?

I have tried print=TRUE and  keep.source=TRUE, but neither seem to
affect this behavior.


thanks,
Remko





-------------------------------------------------
Remko Duursma
Research Lecturer

Hawkesbury Institute for the Environment
University of Western Sydney
Hawkesbury Campus, Richmond

Mobile: +61 (0)422 096908
www.remkoduursma.com



More information about the R-help mailing list