Description Usage Arguments Value
Select rows in the top n groups according to some summarization operation
1 | top_n_groups(df, group_var, val_var, val_fun = sum)
|
df |
data frame |
group_var |
grouping variable |
val_var |
value assessment variable to be summarized by group |
val_fun |
value assessment function to apply to |
data frame only with observations from top groups
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.