Description Usage Arguments Value Examples
This will output a two-column table where the first is the name of the column and the second is the name of that column's levels.
1 |
df |
The |
A tbl_df with two columns, variable and levels. The variable column contains the name of each categorical column, repeated for each level it had, in the same order as in df. The levels column contains each level for the associated variable.
1 2 3 4 5 6 | df <- data.frame(
id = 1:5,
gender = factor(c("M", "F", "M", "M", "F")),
race = factor(c("white", "white", "black", "black", "other"))
)
categorical_summary(df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.