Description Usage Arguments Value See Also Examples
Make a function that takes an Rmonad and recaches it
1 | make_recacher(cacher, preserve = TRUE)
|
cacher |
A function of a data value |
preserve |
logical Should the cached value be preserved across bind operations? |
A function that swaps the cache function of an Rmonad
Other cache: clear_cache
,
fail_cache
, make_cacher
,
memory_cache
, no_cache
,
void_cache
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
recacher <- make_recacher(make_local_cacher())
m <- iris %>>% summary %>% recacher
# load the data from a local file
.single_value(m)
recacher <- make_recacher(memory_cache)
m <- iris %>>% summary %>% recacher
# load the data from memory
.single_value(m)
## End(Not run)
add1 <- function(x) x+1
add2 <- function(x) x+2
add3 <- function(x) x+3
cc <- make_recacher(make_local_cacher())
3 %>>% add1 %>% cc %>>% add2 %>>% add3 -> m
m
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.