Reduce multiple groupings of targetsSource:
Deprecated on 2019-05-16. Use
transformations instead. See
for the details.
reduce_by( plan, ..., prefix = "target", begin = "", op = " + ", end = "", pairwise = TRUE, append = TRUE, filter = NULL, sep = "_" )
Workflow plan data frame of prespecified targets.
Symbols, columns of
planto define target groupings. A
reduce_plan()call is applied for each grouping. Groupings with all
NAs in the selector variables are ignored.
Character, prefix for naming the new targets. Suffixes are generated from the values of the columns specified in
Character, code to place at the beginning of each step in the reduction.
Binary operator to apply in the reduction
Character, code to place at the end of each step in the reduction.
Logical, whether to create multiple new targets, one for each pair/step in the reduction (
TRUE), or to do the reduction all in one command.
TRUE, the output will include the original rows in the
FALSE, the output will only include the new targets and commands.
An expression like you would pass to
dplyr::filter(). The rows for which
TRUEwill be gathered, and the rest will be excluded from gathering. Why not just call
gather_by(append = TRUE, filter = my_column == "my_value")gathers on some targets while including all the original targets in the output. See the examples for a demonstration.
Character scalar, delimiter for creating the names of new targets.
Perform several calls to
based on groupings from columns in the plan,
and then row-bind the new targets to the plan.