Description Usage Arguments See Also Examples
Forget past results.
Resets the cache of a memoised function. Use drop_cache
to
reset the cache only for particular arguments.
1 | forget(f)
|
f |
memoised function |
memoise
, is.memoised
, drop_cache
1 2 3 4 5 6 | memX <- memoise(function() { Sys.sleep(1); runif(1) })
# The forget() function
system.time(print(memX()))
system.time(print(memX()))
forget(memX)
system.time(print(memX()))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.