Similar to dplyr::group_by()
, this function groups a
tibble while also marking certain groups as inapplicable.
group_by2(data, ...)
data | A tibble to group |
---|---|
... | Arguments of the form |
An igrouped tibble
A grouped tibble has one or more grouping variables, where each unique combination of values identifies a group. This function allows some of the values to be marked inapplicable, such that the corresponding rows are not considered to be grouped on that variable at all.
Grouping variables, and inapplicable values, are passed as arguments in
the form group_var = c(value1, value2, ...)
. Any included values
will be marked inapplicable. If an argument has length 0 or is NULL, no
values will be marked inapplicable.