cacher {cacher} | R Documentation |
Caching statistical analyses and R expressions
cacher(srcfile, cachedir = ".cache", logfile = NULL) cc(expr, cachedir = ".cache", srcfile = NULL, ...)
srcfile |
character, source file to be cached |
cachedir |
character, path to cache directory |
logfile |
character, path to file for log messages |
expr |
an R expression |
... |
other arguments passed to cacher |
cacher
caches the results of evaluating the R expressions in
the source file srcfile
. Contents are cached to the directory
indicated by cachedir
and by default, log messages are written
to a log file in the cache directory.
The cc
function caches individual expressions by writing these
expressions to a temporary file and calling cacher
on that
file. The name of the temporary file can be set by using the
srcfile
argument. Otherwise, a random name is chosen.
Nothing useful is returned.
Roger D. Peng rpeng@jhsph.edu
## Not run: sfile <- system.file("examples", "sample.R", package = "cacher") cacher(sfile) ## End(Not run)