Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

forget

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

f

memoised function

See Also

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()))

memoise

Memoisation of Functions

v2.0.0
MIT + file LICENSE
Authors
Hadley Wickham [aut], Jim Hester [aut, cre], Winston Chang [aut], Kirill Müller [aut], Daniel Cook [aut], Mark Edmondson [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.