Last data update: 2014.03.03
|
R: Forget past results. Resets the cache of a memoised function.
Forget past results.
Resets the cache of a memoised function.
Description
Forget past results.
Resets the cache of a memoised function.
Usage
forget(f)
Arguments
See Also
memoise , is.memoised
Examples
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()))
Results
|