Count the number of unique values of one ore more variables by groups.
count_by(data, vars, by, max_n = Inf)
data | A dataset returned by |
---|---|
vars | A character vector indicating the variables to count unique values for. |
by | Columns to group by. |
max_n | The maximum number of values in a group in the returned data. |