identify_numeric_predictors {collinear}R Documentation

Identify numeric predictors

Description

Given 'df' and 'predictors' arguments, this function subsets and returns the numeric predictors.

Usage

identify_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

if (interactive()) {

data(
  vi,
  vi_predictors
)

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

numeric.predictors

}

[Package collinear version 1.1.1 Index]