Takes a column names and makes the RF model formula

erf_formula_prep(var, covariates, add.random = TRUE)

Arguments

var

A character string indicating the column name of the data frame that contains the number of interactions for the ERF to model; column should be a numeric column

covariates

A character vector indicating the column name(s) of the data frame that contain the covariates

add.random

A logical flag for adding a random variable named 'random' to the formula; needed for the ERF models

Value

A formula class object

Examples

erf_formula_prep('death',c('sarlaac','lightsaber','wookie','stormtrooper'))
#> death ~ sarlaac + lightsaber + wookie + stormtrooper + random
#> <environment: 0x7fe59a929a88>