On 24/06/2010 3:00 PM, Gaston Fiore wrote:
Hello,
I'm new to R and Sweave and I was wondering whether you can just include all
your R code in external files and then call them from within the code chunks.
I've read the Sweave User Manual but I couldn't find any specific information
about this. Is this not customarily done?
Normally the idea is that the Sweave document is self-contained, so you
wouldn't do this. However, you would often put a lot of your code into
a package, and then attach the package early in the Sweave document.
It's also possible to use source() in a code chunk.
Duncan Murdoch
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.