Functions to cache objects in order to speed up processes the second time.

cache_clear(save_dir = cache_dir(), recursive = TRUE, ...)

cache_files(save_dir = cache_dir(), recursive = TRUE, ...)

cache_save(obj, path)

Arguments

save_dir

Path to cache directory.

recursive

logical. Should directories be deleted recursively?

...

Arguments passed on to base::unlink, base::unlink

x

a character vector with the names of the file(s) or directories to be deleted.

force

logical. Should permissions be changed (if possible) to allow the file or directory to be removed?

expand

logical. Should wildcards (see ‘Details’ below) and tilde (see path.expand) be expanded?

obj

R object.

path

File name to save to.

Value

Null.

Null.

Functions

  • cache_clear(): cache_ Clear cache

    Remove all data cached by the R package.

  • cache_files(): cache_ List cache

    List all data cached by the R package.

  • cache_save(): cache_ Save cache.

Examples

if (FALSE) {
cache_clear()
}
if (FALSE) {
cache_files()
}
cache_save(mtcars, tempfile())
#> Caching file --> /tmp/RtmpSu2waH/filea03f5f3bd483