I\'ve now got everything to work properly on my Mac OS X 10.6 machine so that I can create decent looking LaTeX documents with Sweave that include snippets of R code, output, an
I use either Aquamacs or Eclipse to do the editing of the .Rnw
file, then I use the following shell function to compile & view it:
sweaveCache () {
Rscript -e "library(cacheSweave); setCacheDir(getwd());
Sweave('$1.Rnw', driver = cacheSweaveDriver)" &&
pdflatex --shell-escape $1.tex &&
open $1.pdf
}
Notice that I'm using the cacheSweave
driver, which helps avoid constantly re-executing code sections that take a long time to run.
BTW, I'm also trying to switch over to Babel instead of Sweave; not sure which I'll end up using more often, but there are definitely aspects of Babel that I like.