Count the number of unique factor level combinations present in a data frame

num_levels(df, ...)

Arguments

df

Data frame

...

Bare/unquoted factors of interest

Value

Integer count of unique factor level combinations

Examples

num_levels(iris, Species)
#> [1] 3