Description Usage Arguments Value Examples
Quick group by metrics for a given group or groups. Only Supports one groupingfor numerical values. Supports multiple for character column groupbys
1 2 3 | ezr.groupby_metric(dataset, groupby_fields,
metric = "mean(., na.rm=TRUE)", numeric_fields_only = TRUE,
num_breaks = 5, return_pct_change = TRUE)
|
dataset |
dataframe |
groupby_fields |
one or a vector. 'vs' or c('vs','am') |
metric |
Spell it out with understanding that it is being passed to summarize_all "mean(., na.rm=TRUE)" |
numeric_fields_only |
By default filters out non-numeric. Pass FALSE if you want to do something like n_distinct or sum(is.na(.)) |
num_breaks |
For Numerical Data, how many quantile bins? Defaults to 5 |
Returns a dataframe of all the grouping levels plus the entire dataset as whole
1 | myfunct_groupby_metric(mtcars, 'vs')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.