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)
fun |
function to memoize |
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.