saveCache {R.cache}R Documentation

Saves data to file cache

Description

Saves data to file cache, which is unique for an optional key object.

Usage

## Default S3 method:
saveCache(object, key=NULL, sources=NULL, suffix=".Rcache", comment=NULL, dirs=NULL, ...)

Arguments

object The object to be saved to file.
key An optional object from which a hexadecimal hash code will be generated and appended to the filename.
sources Source objects used for comparison of timestamps when cache is loaded later.
suffix A character string to be appended to the end of the filename.
comment An optional character string written in ASCII at the beginning of the file.
dirs A character vector constituting the path to the cache subdirectory to be used. If NULL, the root path is used.
... Additional argument passed to save().

Value

Returns (invisible) the pathname of the cache file.

Requirements

To make use of the key argument, the digest package (available on CRAN) must be installed, otherwise an error is generated. That package is not required when key==NULL.

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

See Also

For more details on how the hash code is generated etc, loadCache().

Examples

## Not run: For an example, see ?loadCache

[Package R.cache version 0.1.7 Index]