lazy_save {xfun} | R Documentation |
Save objects to files and lazy-load them
Description
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 |
path |
The path to write files to / read files from. |
method |
The file save/load method. It can be a string (e.g., |
envir |
Value
lazy_save()
returns invisible NULL
; lazy_load()
returns the
object names invisibly.