Learn R Programming

drake (version 4.2.0)

summaries: Function summaries

Description

Generate a worklfow plan data frame for summarizing multiple analyses of multiple datasets multiple ways.

Usage

summaries(plan, analyses, datasets, gather = rep("list", nrow(plan)))

Arguments

plan

workflow plan data frame with commands for the summaries. Use the ..analysis.. and ..dataset.. wildcards just like the ..dataset.. wildcard in analyses().

analyses

workflow plan data frame of analysis instructions

datasets

workflow plan data frame with instructions to make or import the datasets.

gather

Character vector, names of functions to gather the summaries. If not NULL, the length must be the number of rows in the plan. See the gather() function for more.

Value

an evaluated workflow plan data frame of instructions for computing summaries of analyses and datasets. analyses of multiple datasets in multiple ways.

See Also

analyses, make, plan

Examples

Run this code
# NOT RUN {
datasets <- plan(
  small = simulate(5),
  large = simulate(50))
methods <- plan(
  regression1 = reg1(..dataset..),
  regression2 = reg2(..dataset..))
analyses <- analyses(methods, datasets = datasets)
summary_types <- plan(
  summ = summary(..analysis..),
  coef = coef(..analysis..))
summaries(summary_types, analyses, datasets, gather = NULL)
summaries(summary_types, analyses, datasets)
summaries(summary_types, analyses, datasets, gather = "list")
summaries(summary_types, analyses, datasets, gather = c("list", "rbind"))
# }

Run the code above in your browser using DataLab