Memoize.function | R Documentation |
Before each call of a function, check that the cache holds the results and returns it if available. Otherwise, compute f and cache the result for next evluations.
Memoize.function(fun, suffix = ".RcacheDiceView")
fun |
function to memoize |
suffix |
suffix to use for cache files (default ".RcacheDiceView") |
a function with same behavior than argument one, but using cache.
f=function(n) rnorm(n);
F=Memoize.function(f);
F(5); F(6); F(5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.