Skip to contents

Extract predictor names from formulas

Usage

extract_var_from_formulas(formulas, ...)

Arguments

formulas

(character or formula) model formulas.

...

Arguments to pass to all.vars()

Value

A character vector or a list of the same length as formulas, containing the names of the predictors each formula.

Examples

# Import an example of calibration results
data(calib_results_maxnet, package = "kuenm2")

# Extract predictor names
vars <- extract_var_from_formulas(calib_results_maxnet$formula_grid$Formulas)