with_cache | R Documentation |
If the target file exists it will be loaded unless the 'overwrite' argument is set.
with_cache(file, object, overwrite = FALSE, ...)
file |
Where to cache the R object |
object |
An R object |
overwrite |
Whether to overwrite the cached object |
... |
Unused, will warn |
The fresh/cached object.
## Not run: target <- tempfile() result <- with_cache(target, { 1 + 1 }) result <- with_cache(target, { 1 + 1 }) unlink(target) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.