powered by
A wrapper around dplyr::count() with sort set to TRUE by default and the an additional column created by default containing the proportional fraction each observation makes of the whole.
dplyr::count()
sort
TRUE
count2(x, ..., wt = NULL, sort = TRUE, prop = TRUE, sum = NULL)count_vec(x, sort = TRUE, prop = TRUE, sum = NULL)
count_vec(x, sort = TRUE, prop = TRUE, sum = NULL)
A tibble of element counts
A data frame.
Variables to group by.
Frequency weights.
If TRUE, will show the largest groups at the top.
If TRUE, compute the fraction of marginal table.
Column to replace with a cumulative sum (n, p, or np).
n
p
np
count2(iris, Species)
Run the code above in your browser using DataLab