Description Usage Arguments Details Value See Also Examples
Groups data by specified columns: further operations then work within those groups
1 2 3 |
.self |
Data frame |
... |
Additional parameters |
auto_partition |
Re-partition across cluster after operation |
.dots |
Workaround for non-standard evaluation |
.cols |
Columns to group by (used internally) |
Many data analysis problems require working with particular combinations
of data. For example, finding the average sales for a given day of the
week could be achieved with group_by(day)
and
summarise(sales = mean(sales)
. This would result in a data frame
with 7 rows (1 for each group) with the average sales stored in the
sales column.
Multiple grouping variables may be specified, separated by columns. The
above example could be extended to group by month as well as weekday,
e.g. group_by(month, day)
. The resulting data frame would then
have 12 blocks of 7 (84 rows) with an average for each week day in that
month provided the same way as above.
Data frame
Other row manipulations: arrange
,
distinct
, filter
,
slice
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.