tar_pipeline: Declare a pipeline of targets.

Description Usage Arguments Value Examples

View source: R/tar_pipeline.R

Description

A pipeline is similar to a Makefile or a drake plan. It is a collection of targets, or skippable steps, in an automated reproducible workflow.

Usage

1

Arguments

...

Targets or lists of targets defined with tar_target().

Value

A pipeline object. The _targets.R file of a project must end with a call tar_pipeline(). Otherwise, users do not work pipeline objects directly.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
file <- tar_target(data_file, "data.csv", format = "file")
object <- tar_target(data_object, read.csv(data_file))
analysis <- tar_target(analysis, analyze(data_object))
pipeline <- tar_pipeline(file, object, analysis)
print(pipeline)
# Equivalent:
target_list <- list(
  tar_target(data_file, "data.csv", format = "file"),
  tar_target(data_object, read.csv(data_file)),
  tar_target(analysis, analyze(data_object))
)
pipeline <- tar_pipeline(target_list)

wlandau/targets documentation built on Aug. 7, 2020, 9:43 a.m.