[R] several figures from one Sweave chunk?
Liviu Andronic
landronimirc at gmail.com
Thu Aug 5 17:40:33 CEST 2010
Dear all
It seems that it is not possible [1] to generate several graphs in a
loop within an Sweave document. For example,
<<fig=TRUE>>
for (i in 1:4) plot(rnorm(100)+i)
@
will not work. Since this limitation dates from old times (at least
2005), I was curious whether workarounds other than
"\includegraphics{}" appeared in meantime. Perhaps something related to
cacheSweave or pgfSweave? If you are aware of any such hacks, please
post them here.
Regards
Liviu
[1] http://www.stat.uni-muenchen.de/~leisch/Sweave/FAQ.html#x1-11000A.9
More information about the R-help
mailing list