50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

drake (version 5.0.0)

drake_build: Build/process a single target or import.

Description

For internal use only. the only reason this function is exported is to set up parallel socket (PSOCK) clusters without much of a fuss.

Usage

drake_build(target, config, meta = NULL)

Arguments

target

name of the target

config

internal configuration list

meta

list of metadata that tell which targets are up to date (from drake_meta()).

Value

The value of the target right after it is built.

Examples

Run this code
# 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)
# Optionally, compute metadata on 'small',
# including a hash/fingerprint
# of the dependencies. If meta is not supplied,
# drake_build() computes it automatically.
meta <- drake_meta(target = "small", config = config)
# Should not yet include 'small'.
cached()
# Build 'small'.
# Equivalent to just drake_build(target = "small", config = config).
drake_build(target = "small", config = config, meta = meta)
# Should now include 'small'
cached()
readd(small)
})
# }

Run the code above in your browser using DataLab