Count the number of unique factor level combinations present in a data frame
num_levels(df, ...)
df | Data frame |
---|---|
... | Bare/unquoted factors of interest |
Integer count of unique factor level combinations
num_levels(iris, Species)#> [1] 3