fgroup_by {timeplyr} | R Documentation |
'collapse' version of dplyr::group_by()
Description
This works the exact same as dplyr::group_by()
and typically
performs around the same speed but uses slightly less memory.
Usage
fgroup_by(
data,
...,
.add = FALSE,
order = df_group_by_order_default(data),
.by = NULL,
.cols = NULL,
.drop = df_group_by_drop_default(data)
)
Arguments
data |
data frame. |
... |
Variables to group by. |
.add |
Should groups be added to existing groups?
Default is |
order |
Should groups be ordered? If |
.by |
(Optional). A selection of columns to group by for this operation.
Columns are specified using |
.cols |
(Optional) alternative to |
.drop |
Should unused factor levels be dropped? Default is |
Details
fgroup_by()
works almost exactly like the 'dplyr' equivalent.
An attribute "sorted" (TRUE
or FALSE
) is added to the group data to
signify if the groups are sorted or not.
Value
A grouped_df
.