Skip to contents

Creating a contingency table based on a response(s) ~ predictor(s) formula.

Usage

cont_table(x, formula, useNA = "no")

Arguments

x

A data frame

formula

a response(s) ~ predictor(s) formula. If multiple variables are used as the response or predictor, concat is used to create a new variable by concatenating the values of all variables used. @param useNA This is passed to table() and can take these values: c("no", "ifany", "always"). The default value is "no".

Value

a contingency table based on the formula: Rows representing response(s) and columns representing predictor(s).

See also

Examples