
Last chance! 50% off unlimited learning
Sale ends in
Set cache info so easyr can manage the cache.
cache.init(
caches,
at.path,
verbose = TRUE,
save.only = FALSE,
skip.missing = TRUE,
n_processes = 2
)
List of lists with properties name, depends.on. See example.
Where to save the cache. If NULL, a cache/ folder will be created in the current working directory.
Print via cat() information about cache operations.
Choose not to load the cache. Use this if you need to check cache validity in multiple spots but only want to load at the last check.
Passed to hashfiles, choose if an error occurs if a depends.on file isn't found.
Passed to qs to determine how many cores/workers to use when reading/saving data.
# initialize a cache with 1 cache which depends on files in the current working directory.
# this will create a cache folder in your current working directory.
# then, you call functions to check and build the cache.
if (FALSE) {
folder = system.file('extdata', package = 'easyr')
cache.init(
# Initial file read (raw except for renaming).
caches = list(
list(
name = 'prep-files',
depends.on = paste0(folder, '/script.R')
)
),
at.path = paste0(tempdir(), '/cache')
)
}
Run the code above in your browser using DataLab