identify_response_type {collinear}R Documentation

Identify Response Type

Description

Internal function to identify the type of response variable. Supported types are:

Usage

identify_response_type(df = NULL, response = NULL, quiet = FALSE)

Arguments

df

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

response

(optional; character string or vector) Name/s of response variable/s in df. Used in target encoding when it names a numeric variable and there are categorical predictors, and to compute preference order. Default: NULL.

quiet

(optional; logical) If FALSE, messages generated during the execution of the function are printed to the console Default: FALSE

Value

character string: response type

See Also

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

Examples

identify_response_type(
  df = vi,
  response = "vi_numeric"
)

identify_response_type(
  df = vi,
  response = "vi_counts"
)

identify_response_type(
  df = vi,
  response = "vi_binomial"
)

identify_response_type(
  df = vi,
  response = "vi_categorical"
)

identify_response_type(
  df = vi,
  response = "vi_factor"
)


[Package collinear version 2.0.0 Index]