Description Usage Arguments Value Examples
View source: R/with_filecache.R
Execute an expression, while saving result to a local file
1 2 | with_filecache(expr, filename, cache_dir = fcutils_options()$cache_dir,
parse = NULL)
|
expr |
R expression whose result should be cached |
filename |
A unique name for cached item |
cache_dir |
The directory in which to cache result. Defaults to '.Rcache' (to change default, use |
parse |
(optional) Whether to parse expression before executing (default TRUE for character exprs, otherwise FALSE) |
The contents of the cache-file, if that file exists. Otherwise, result of expr
1 2 3 | res <- with_filecache(some_long_running_function(),
filename = 'cache_this_result.Rds',
cache_dir = 'name_of_this_document')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.