count2 | R Documentation |
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.
count2(x, ..., wt = NULL, sort = TRUE, prop = TRUE, sum = NULL)
count_vec(x, sort = TRUE, prop = TRUE, sum = NULL)
x |
A data frame. |
... |
Variables to group by. |
wt |
Frequency weights. |
sort |
If |
prop |
If |
sum |
Column to replace with a cumulative sum ( |
A tibble of element counts
count2(iris, Species)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.