drake (version 7.3.0)

drake_build: Build/process a single target or import.

Description

Also load the target's dependencies beforehand.

Usage

drake_build(target, config = NULL, meta = NULL,
  character_only = FALSE, envir = NULL, jobs = 1, replace = FALSE)

Arguments

target

Name of the target.

config

Internal configuration list.

meta

Deprecated.

character_only

Logical, whether name should be treated as a character or a symbol (just like character.only in library()).

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.

replace

Logical. If FALSE, items already in your environment will not be replaced.

Value

The value of the target right after it is built.

See Also

drake_debug()

Examples

Run this code
# NOT RUN {
isolate_example("Quarantine side effects.", {
if (suppressWarnings(require("knitr"))) {
# 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_mtcars_example() # Get the code with drake_example("mtcars").
# 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)
config <- drake_config(my_plan)
result <- drake_build(small, config = config)
head(result)
}
})
# }

Run the code above in your browser using DataCamp Workspace