freq_tab {socviz} | R Documentation |
Generate a tidy n-way frequency table
Description
Generate a tidy n-way frequency table
Usage
freq_tab(df, ...)
Arguments
df |
tibble or data frame (implicit within pipline) |
... |
grouping, as with group_by() |
Details
Tidyverse, pipeline, and dplyr-friendly frequency tables
Value
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.
Author(s)
Kieran Healy
Examples
mtcars %>% freq_tab(vs, gear, carb)
[Package socviz version 1.2 Index]