Description Usage Arguments Value
Function to generate group-counts and percentages
1 | summarizer(df, group_cols, output_prefixs)
|
df |
Data-frame with each row corresponding to an observation you want counted by groups. |
group_cols |
Character-vector of columns to group the dataframe by, in order of order you want the grouping done. |
output_prefixs |
Character-vector of equal length as the group_cols with prefixes for output columns corresponding to each group_col; e.g., "type" if you're grouping by type will produce type_num and type_pct. |
A summary dataframe with information on the number of observations per each group/combination of groups in order. E.g., c(animal, breed, likeability) will group by animal, then animal/breed, then animal/breed/likeability, and calculate the percentage of each animal group of all animals, of each animal/breed group of each animal group, and of each animal/breed/likeability group of each animal/breed group.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.