freq_tab {socviz} | R Documentation |
Generate a tidy n-way frequency table
freq_tab(df, ...)
df |
tibble or data frame (implicit within pipline) |
... |
grouping, as with group_by() |
Tidyverse, pipeline, and dplyr-friendly frequency tables
A tibble with the grouping variables, the N ('n') per group, and the proportion ('prop') of each group, calculated with respect to the outermost grouping variable.
Kieran Healy
mtcars %>% freq_tab(vs, gear, carb)