| run.cache | R Documentation | 
This method saves the function that's being called
run.cache( fun, ..., seed = NULL, base.dir = NULL, cache.prefix = "generic_cache", cache.digest = list(), show.message = NULL, force.recalc = FALSE, add.to.hash = NULL )
fun | 
 function call name  | 
... | 
 parameters for function call  | 
seed | 
 when function call is random, this allows to set seed beforehand  | 
base.dir | 
 directory where data is stored  | 
cache.prefix | 
 prefix for file name to be generated from parameters (...)  | 
cache.digest | 
 cache of the digest for one or more of the parameters  | 
show.message | 
 show message that data is being retrieved from cache  | 
force.recalc | 
 force the recalculation of the values  | 
add.to.hash | 
 something to add to the filename generation  | 
the result of fun(...)
# [optional] save cache in a temporary directory # run.cache(c, 1, 2, 3, 4) # # next three should use the same cache # note, the middle call should be a little faster as digest is not # calculated # for the first argument run.cache(c, 1, 2, 3, 4) run.cache(c, 1, 2, 3, 4, cache.digest = list(digest.cache(1))) run.cache(c, a=1, 2, c= 3, 4) ## Not run: # Using a local folder # run.cache(c, 1, 2, 3, 4, base.dir = "runcache") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.