2 \alias{cacheSweaveDriver}
4 \alias{cacheSweave-package}
6 \title{Cache Sweave Computations}
8 Cache computations when using Sweave
15 Computations in Sweave documents can be cached by setting the option
16 \code{cache=true} in the code check declaration. When this option is
17 set, objects that are created in the code chunk (either through
18 assignment or by side effects) are stored in a key-value database in
19 the directory specified by \code{setCacheDir}.
21 The \code{cacheSweaveDriver} function is used directly with
22 \code{Sweave} and is passed as the \code{driver} argument.
23 \code{cacheSweaveDriver} also creates a "map file" which has the
24 extention ".map" which contains metadata for each of the code chunks
25 in a document. This map file can be used in conjunction with the
26 \code{RRPM} package for creating reproducible research packages.
30 Code chunks that have side effects that do not result in objects being
31 created in the global environment (i.e. plotting or system
32 interaction) should generally not be cached since the code will not be
33 run upon reevaluation.
37 Nothing useful is returned.
40 \author{Roger D. Peng \email{rpeng@jhsph.edu}, with much code for
41 \code{cacheSweaveDriver} copied from Sweave source by Friedrich Leisch
45 \code{\link{Sweave}} and package \code{RRPM}
48 \keyword{utilities}% at least one, from doc/KEYWORDS