identify_predictors: Identify Numeric and Categorical Predictors

View source: R/identify.R

identify_predictorsR Documentation

Identify Numeric and Categorical Predictors

Description

Returns a list with the names of the valid numeric predictors and the names of the valid categorical predictors

Usage

identify_predictors(df = NULL, predictors = NULL)

Arguments

df

(required; data frame, tibble, or sf) A data frame with responses and predictors. Default: NULL.

predictors

(optional; character vector) Names of the predictors to select from df. If omitted, all numeric columns in df are used instead. If argument response is not provided, non-numeric variables are ignored. Default: NULL

Value

list: names of numeric and categorical predictors

Author(s)

Blas M. Benito, PhD

See Also

Other data_types: identify_predictors_categorical(), identify_predictors_numeric(), identify_predictors_type(), identify_predictors_zero_variance(), identify_response_type()

Examples

if (interactive()) {

data(
  vi,
  vi_predictors
)

predictors_names <- identify_predictors(
  df = vi,
  predictors = vi_predictors
)

predictors_names

}

collinear documentation built on April 12, 2025, 1:36 a.m.