Learn R Programming

drake (version 4.4.0)

workplan: Function workplan

Description

Turns a named collection of command/target pairs into a workflow plan data frame for make and check.

Usage

workplan(..., list = character(0), file_targets = FALSE,
  strings_in_dots = c("filenames", "literals"))

Arguments

...

same as for drake::workplan()

list

same as for drake::workplan()

file_targets

same as for drake::workplan()

strings_in_dots

same as for drake::workplan()

Value

data frame of targets and command

Details

A workflow plan data frame is a data frame with a target column and a command column. Targets are the objects and files that drake generates, and commands are the pieces of R code that produce them.

For file inputs and targets, drake uses single quotes. Double quotes are reserved for ordinary strings. The distinction is important because drake thinks about how files, objects, targets, etc. depend on each other. Quotes in the list argument are left alone, but R messes with quotes when it parses the free-form arguments in ..., so use the strings_in_dots argument to control the quoting in ....

Examples

Run this code
# NOT RUN {
workplan(small = simulate(5), large = simulate(50))
workplan(list = c(x = "1 + 1", y = "sqrt(x)"))
workplan(data = readRDS("my_data.rds"))
workplan(my_file.rds = saveRDS(1+1, "my_file.rds"), file_targets = TRUE,
  strings_in_dots = "literals")
# }

Run the code above in your browser using DataLab