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, pathname=NULL,
dirs=NULL, compress=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 |
comment |
An optional |
pathname |
(Advanced) An optional |
dirs |
A |
compress |
If |
... |
Additional argument passed to |
Value
Returns (invisible) the pathname of the cache file.
Compression
The saveCache()
method saves a compressed cache file
(with filename extension *.gz) if argument compress
is TRUE
.
The loadCache
() method locates (via findCache
()) and
loads such cache files as well.
Author(s)
Henrik Bengtsson
See Also
For more details on how the hash code is generated etc, loadCache
().
Examples
## Not run: For an example, see ?loadCache