It returns the ordered counts of the variable in the data.frame.
Examples
data.frame(a = c("x", "y", "x"), b = c("z", "z", "n")) |>
count_sorted(a)
#> a n
#> 1 x 2
#> 2 y 1
It returns the ordered counts of the variable in the data.frame.
data.frame(a = c("x", "y", "x"), b = c("z", "z", "n")) |>
count_sorted(a)
#> a n
#> 1 x 2
#> 2 y 1