R/build.R
For internal use only. the only reason this function is exported is to set up parallel socket (PSOCK) clusters without much of a fuss.
drake_build(target, config = drake::read_drake_config(envir = envir, jobs = jobs), meta = NULL, character_only = FALSE, envir = parent.frame(), jobs = 1, replace = FALSE)
target | name of the target |
---|---|
config | internal configuration list |
meta | list of metadata that tell which
targets are up to date (from |
character_only | logical, whether |
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 |
replace | logical. If |
The value of the target right after it is built.
# NOT RUN { test_with_dir("Quarantine side effects.", { # This example is not really a user-side demonstration. # It just walks through a dive into the internals. # Populate your workspace and write 'report.Rmd'. load_basic_example() # Get the code with drake_example("basic"). # Create the master internal configuration list. config <- drake_config(my_plan) out <- drake_build(small, config = config) # Now includes `small`. cached() head(readd(small)) # `small` was invisibly returned. head(out) # If you previously called make(), # `config` is just read from the cache. make(my_plan, verbose = FALSE) result <- drake_build(small) head(result) }) # }