add_group | R Documentation |
add_group()
allows for the injection of aggregation into the transformation
pipeline. Should you need to apply a transformation under aggregation (e.g.
add_shuffle
) this helper creates a grouped data.frame
as would be done
with dplyr::group_by()
.
The function add_ungroup()
is supplied to perform the inverse operation.
add_group(object, ...)
add_ungroup(object, ...)
object |
Either a |
... |
Variables on which data is to be grouped. |
A 'DeidentList' representing the untrained transformation pipeline. The object contains fields:
deident_methods
a list of each step in the pipeline (consisting of variables
and method
)
and methods:
mutate
apply the pipeline to a new data set
to_yaml
serialize the pipeline to a '.yml' file
pipe.grouped <- add_group(ShiftsWorked, Date, Shift)
pipe.grouped_shuffle <- add_shuffle(pipe.grouped, `Daily Pay`)
add_ungroup(pipe.grouped_shuffle, `Daily Pay`)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.