forget: Forget past results. Resets the cache of a memoised function.

Description Usage Arguments See Also Examples

Description

Forget past results. Resets the cache of a memoised function.

Usage

1
forget(f)

Arguments

f

memoised function

See Also

memoise, is.memoised

Examples

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

memoise documentation built on May 2, 2019, 12:21 p.m.