Uses wildcards to create a new workflow plan data frame from a template data frame.

plan_analyses(plan, datasets)

Arguments

plan

workflow plan data frame of analysis methods. The commands in the command column must have the dataset__ wildcard where the datasets go. For example, one command could be lm(dataset__). Then, the commands in the output will include lm(your_dataset_1), lm(your_dataset_2), etc.

datasets

workflow plan data frame with instructions to make the datasets.

Value

An evaluated workflow plan data frame of analysis targets.

See also

plan_summaries(), make(), drake_plan()

Examples

# Create the piece of the workflow plan for the datasets. datasets <- drake_plan( small = simulate(5), large = simulate(50)) # Create a template for the analysis methods. methods <- drake_plan( regression1 = reg1(dataset__), regression2 = reg2(dataset__)) # Evaluate the wildcards to create the part of the workflow plan # encoding the analyses of the datasets. ans <- plan_analyses(methods, datasets = datasets) ans
#> # A tibble: 4 x 2 #> target command #> <chr> <chr> #> 1 regression1_small reg1(small) #> 2 regression1_large reg1(large) #> 3 regression2_small reg2(small) #> 4 regression2_large reg2(large)
# For the final workflow plan, row bind the pieces together. my_plan <- rbind(datasets, ans) my_plan
#> # A tibble: 6 x 2 #> target command #> <chr> <chr> #> 1 small simulate(5) #> 2 large simulate(50) #> 3 regression1_small reg1(small) #> 4 regression1_large reg1(large) #> 5 regression2_small reg2(small) #> 6 regression2_large reg2(large)