MemoFunc - A Function Memoization Package for R

A simple way to memoise function results to improve performance by eliminating unnecessary computation or data retrieval activities.

Functions can be memoized with a simple call to memo.

Calling a memo is exactly like calling a normal function, in fact it is a normal function! The memo has all the same arguments and defaults as the origional function so it can be used in legacy code without the need for any risky refactoring.

Memoing a function can significantly improve the performance of a system by limiting how often expensive call are made. Functions that return a NULL value can be memoed by using the allow.null argument.

Installation

Install from CRAN:

install.packages("memofunc")

Install latest release:

devtools::install_github("rwetherall/memofunc")