saveCache {R.cache} | R Documentation |
Saves data to file cache, which is unique for an optional key object.
## Default S3 method: saveCache(object, key=NULL, sources=NULL, suffix=".Rcache", comment=NULL, dirs=NULL, ...)
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 (). |
Returns (invisible) the pathname of the cache file.
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
.
Henrik Bengtsson (http://www.braju.com/R/)
For more details on how the hash code is generated etc, loadCache
().
## Not run: For an example, see ?loadCache