Duplicates the rows of a workflow plan data frame. Prefixes are appended to the new target names so targets still have unique names.

expand_plan(plan, values = NULL)

Arguments

plan

workflow plan data frame

values

values to expand over. These will be appended to the names of the new targets.

Value

An expanded workflow plan data frame (with replicated targets).

Examples

# Create the part of the workflow plan for the datasets. datasets <- drake_plan( small = simulate(5), large = simulate(50)) # Create replicates. If you want repeat targets, # this is convenient. expand_plan(datasets, values = c("rep1", "rep2", "rep3"))
#> # A tibble: 6 x 2 #> target command #> <chr> <chr> #> 1 small_rep1 simulate(5) #> 2 small_rep2 simulate(5) #> 3 small_rep3 simulate(5) #> 4 large_rep1 simulate(50) #> 5 large_rep2 simulate(50) #> 6 large_rep3 simulate(50)