identify_non_numeric_predictors {collinear}R Documentation

Identify non-numeric predictors

Description

Given 'df' and 'predictors' arguments, this function subsets and returns the non-numeric (character, factor, and logical) predictors.

Usage

identify_non_numeric_predictors(df = NULL, predictors = NULL)

Arguments

df

(required; data frame) A data frame with numeric and/or character predictors predictors, and optionally, a response variable. Default: NULL.

predictors

(optional; character vector) A vector with predictor names in 'df'. If omitted, all columns of 'df' are used as predictors. Default:'NULL'

Value

character vector with names of numeric predictors.

Author(s)

Blas M. Benito

Examples


data(
  vi,
  vi_predictors
)

non.numeric.predictors <- identify_non_numeric_predictors(
  df = vi,
  predictors = vi_predictors
)

non.numeric.predictors


[Package collinear version 1.1.1 Index]