Learn R Programming

drake (version 4.2.0)

loadd: Function loadd

Description

Load object(s) from the drake cache into the current workspace (or envir if given). Defaults to loading the whole cache if arguments ... and list are not set (or all the imported objects if in addition imported_only is TRUE).

Usage

loadd(..., list = character(0), imported_only = FALSE, path = getwd(),
  search = TRUE, cache = NULL, envir = parent.frame(), jobs = 1)

Arguments

...

targets to load from the cache, as names (unquoted) or character strings (quoted). Similar to ... in remove(...).

list

character vector naming targets to be loaded from the cache. Similar to the list argument of remove().

imported_only

logical, whether only imported objects should be loaded.

path

Root directory of the drake project, or if search is TRUE, either the project root or a subdirectory of the project.

search

logical. If TRUE, search parent directories to find the nearest drake cache. Otherwise, look in the current working directory only.

cache

optional drake cache. See codenew_cache(). If cache is supplied, the path and search arguments are ignored.

envir

environment to load objects into. Defaults to the calling environment (current workspace).

jobs

number of parallel jobs for loading objects. On non-Windows systems, the loading process for multiple objects can be lightly parallelized via parallel::mclapply(). just set jobs to be an integer greater than 1. On Windows, jobs is automatically demoted to 1.

See Also

cached, built, imported, plan, make,

Examples

Run this code
# NOT RUN {
load_basic_example()
make(my_plan)
loadd(reg1) # now check ls()
reg1
loadd(small)
small
loadd(list = c("small", "large"), jobs = 2)
loadd(imported_only = TRUE) # load all imported objects and functions
loadd() # load everything, including built targets
# }

Run the code above in your browser using DataLab