From a character vector, which values are most common?

most_common(x, n = 6)

Arguments

x

A vector.

n

Number of values to return.

Value

Sorted vector of n most common values.

Examples

most_common(iris$Species, n = 1)
#> [1] "setosa"