switch_pipeline: Branch a dplyr pipeline based on a set of conditions
Description
Branch a dplyr pipeline based on a set of conditions
Usage
switch_pipeline(.x, ...)
Value
the result of applying purrr function to .x in the case where
predicate evaluates to true. Both predicate and function can refer to
the pipeline dataframe using .x
Arguments
.x
a dataframe
...
a list of formulae of the type predicate ~ purrr function using
.x as the single parameter