Skip to contents

Creates a regression formula from a data frame, excluding specified columns.

Usage

create_formula(dataframe, outcome, exclusions)

Arguments

dataframe

The input data frame.

outcome

The outcome variable.

exclusions

A vector of columns to exclude from the formula.

Value

A formula object for regression.

Examples

create_formula(mtcars, "mpg", exclusions = c("cyl", "gear"))
#> mpg ~ disp + hp + drat + wt + qsec + vs + am + carb
#> <environment: 0x13e1cd740>