df_counts {mosaicModel}R Documentation

Formula interface to counts

Description

Counts the number of cases in a data frame broken down by the variables in the formula.

Usage

df_counts(formula, data, wide = FALSE, margins = FALSE)

Arguments

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 wide = TRUE.

See Also

df_props


[Package mosaicModel version 0.3.0 Index]