identify_predictors_type: Identify Predictor Types

View source: R/identify.R

identify_predictors_typeR Documentation

Identify Predictor Types

Description

Internal function to identify predictor types. The supported types are:

  • "numeric": all predictors belong to the classes "numeric" and/or "integer".

  • "categorical": all predictors belong to the classes "character" and/or "factor".

  • "mixed": predictors are of types "numeric" and "categorical".

  • "unknown": predictors of unknown type.

Usage

identify_predictors_type(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

character string: predictors type

See Also

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

Examples


identify_predictors_type(
  df = vi,
  predictors = vi_predictors
)

identify_predictors_type(
  df = vi,
  predictors = vi_predictors_numeric
)

identify_predictors_type(
  df = vi,
  predictors = vi_predictors_categorical
)


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