Adds variables total and
pct (percentage) to dplyr::count()
Arguments
- data
A dataset
- ...
Other parameters passed to count()
Examples
count_pct(iris, Species)
#> Species n total pct
#> 1 setosa 50 150 33.33333
#> 2 versicolor 50 150 33.33333
#> 3 virginica 50 150 33.33333