Description Usage Arguments Value See Also Examples
Obtain the relative distribution of a categorical variable within the group member of a different variable.
1 | freq_table(x, group_var, prop_var)
|
x |
a data frame |
group_var |
the variable to group by |
prop_var |
the variable over which to calculate the frequencies |
A data frame with both the absolute and the relative distribution of 'prop_var' within 'group_var'.
Inspired by SO question 24576515
1 | mtcars %>% freq_table(vs, cyl)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.