Skip to content

ghane/memoise

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

memoise

If a function is called multiple times with the same input, you can often speed things up by keeping a cache of known answers that it can retrieve. This is called memoisation http://en.wikipedia.org/wiki/Memoization. The memoise package provides a simple syntax

mf <- memoise(f)

to create mf(), a memoised wrapper around f(). You can clear mf's cache with

forget(mf)

, and you can test whether a function is memoised with

is.memoised(mf) # TRUE
is.memoised(f)  # FALSE

.

About

Easy memoisation for R

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • R 100.0%