Skip to contents

Identifies factor variables in a formula that have fewer than two levels.

Usage

check_formula_factors(formula, dataframe)

Arguments

formula

A formula object.

dataframe

A data frame containing the variables in the formula.

Value

A vector of factor variable names with fewer than two levels.

Examples

check_formula_factors(mpg ~ cyl + gear, mtcars)
#> character(0)