group_by | R Documentation |
Group a data.frame by chosen columns
group_by_(df, group = NULL)
df |
data.frame |
group |
formula that describes the group |
The function returns a list.
Each element of the list is a subset of data frame df
. Subset is determined by variables given in group
.
Each data frame get the following properties:
Columns are not modified.
Only rows corresponding to the subset.
Data frame attributes are preserved.
tmp <- group_by_(CO2,~c(Type,Treatment))
tmp[[1]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.