Describe categorical variables by N, number of unique values, and mode. Note that in case of multiple modes, the first mode by order of values is chosen.
describe_cat(data, ...)
data | a tibble |
---|---|
... | Variables to describe (column names). Leave empty to describe all categorical variables in data. |
a tibble
If no variables are specified, all categorical (character or factor) variables are described.
Other descriptives:
describe()
iris %>% describe_cat()#> # A tibble: 1 x 6 #> Variable N Missing Unique Mode Mode_N #> <chr> <int> <int> <int> <chr> <int> #> 1 Species 150 0 3 setosa 50