Count values in one or more columns
Arguments
- x
A data frame
- ...
The columns to count. If more than one column is chosen, combinations of values are counted.
Value
A data frame with one column for every grouping identified by ...
and an additional column for the number of values counted
Examples
mtcars |>
count(cyl)
#> cyl n
#> 1 4 11
#> 2 6 7
#> 3 8 14