cacher: Cache statistical analyses

Description Usage Arguments Details Value Author(s) Examples

View source: R/compile.R

Description

Caching statistical analyses and R expressions

Usage

1
2
cacher(srcfile, cachedir = ".cache", logfile = NULL)
cc(expr, cachedir = ".cache", srcfile = NULL, ...)

Arguments

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

Details

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.

Value

Nothing useful is returned.

Author(s)

Roger D. Peng rpeng@jhsph.edu

Examples

1
2
3
4
5
## Not run: 
sfile <- system.file("examples", "sample.R", package = "cacher")
cacher(sfile)

## End(Not run)

rdpeng/cacher documentation built on May 27, 2019, 3:06 a.m.