Learn R Programming

targets (version 0.0.0.9000)

tar_load_raw: Load the values of targets (raw version).

Description

Same as tar_load() except names is a character vector. Do not use in knitr or R Markdown reports with tarchetypes::tar_knit() or tarchetypes::tar_render().

Usage

tar_load_raw(names, branches = NULL, meta = tar_meta(), envir = parent.frame())

Arguments

names

Character vector, names of the targets to build or check.

branches

Integer of indices of the branches to load for any targets that are patterns.

meta

Data frame of metadata from tar_meta(). tar_read() with the default arguments can be inefficient for large pipelines because all the metadata is stored in a single file. However, if you call tar_meta() beforehand and supply it to the meta argument, then successive calls to tar_read() may run much faster.

envir

Environment to put the loaded targets.

Value

Nothing.

Examples

Run this code
# NOT RUN {
tar_dir({
tar_script(
  tar_pipeline(
    tar_target(y1, 1 + 1),
    tar_target(y2, 1 + 1),
    tar_target(z, y1 + y2)
  )
)
tar_make()
tar_load_raw(c("y1", "y2"))
y1
y2
})
# }

Run the code above in your browser using DataLab