Counts the number of cases in a data frame broken down by the variables in the formula.
df_counts(formula, data, wide = FALSE, margins = FALSE)
| formula | the formula describing the relationship |
|---|---|
| data | a data frame (or you can pipe this in) |
| wide | reformat the output as a cross-tabulation. This makes sense only when there are just two variables |
| margins | show the marginal counts. Makes the most sense if |
df_props