Sweave("testcache.Rnw") system("pdflatex testcache") file.copy("testcache.pdf","testcache_nocache.pdf",overwrite=TRUE) library(cacheSweave) Sweave("testcache.Rnw",driver=cacheSweaveDriver) system("pdflatex testcache") file.copy("testcache.pdf","testcache_cacheSweave.pdf",overwrite=TRUE) library(weaver) Sweave("testcache.Rnw",driver=weaver) system("pdflatex testcache") file.copy("testcache.pdf","testcache_weaver.pdf",overwrite=TRUE) library(pgfSweave) Sweave("testcache.Rnw",driver=pgfSweaveDriver) system("pdflatex testcache") file.copy("testcache.pdf","testcache_pgfSweave.pdf",overwrite=TRUE) pgfSweave("testcache.Rnw",compile.tex=FALSE) system("pdflatex testcache") file.copy("testcache.pdf","testcache_pgfSweave_2.pdf",overwrite=TRUE)