The function lazy_save() saves objects to files with incremental integer
names (e.g., the first object is saved to 1.rds, and the second object is
saved to 2.rds, etc.). The function lazy_load() lazy-load objects from
files saved via lazy_save(), i.e., a file will not be read until the object
is used.
Usage
lazy_save(list = NULL, path = "./", method = "auto", envir = parent.frame())
lazy_load(path = "./", method = "auto", envir = parent.frame())Arguments
- list
A character vector of object names. This list will be written to an index file with
0as the base name (e.g.,0.rds).- path
The path to write files to / read files from.
- method
The file save/load method. It can be a string (e.g.,
rds,raw, orqs2) or a list. See therwargument ofcache_exec(). By default, it is automatically detected by checking the existence of the index file (e.g.,0.rds,0.raw, or0.qs2).- envir