Skip to contents

Adds variables total and pct (percentage) to dplyr::count()

Usage

count_pct(data, ...)

Arguments

data

A dataset

...

Other parameters passed to count()

Value

Dataset

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