The easiest way to create a grouped data frame is to call
the group_by method on a data frame or tbl: this
will take care of capturing the unevalated expressions for
you.
Usage
grouped_df(data, vars, drop = TRUE)
is.grouped_df(x)
Arguments
data
a tbl or data frame.
vars
a list of quoted variables.
drop
if TRUE preserve all factor levels,
even those without data.