get_names {creditmodel}R Documentation

Get Variable Names

Description

get_names is for getting names of particular classes of variables

Usage

get_names(
  dat,
  types = c("logical", "factor", "character", "numeric", "integer64", "integer",
    "double", "Date", "POSIXlt", "POSIXct", "POSIXt"),
  ex_cols = NULL,
  get_ex = FALSE
)

Arguments

dat

A data.frame with independent variables and target variable.

types

The class or types of variables which names to get. Default: c('numeric', 'integer', 'double')

ex_cols

A list of excluded variables. Regular expressions can also be used to match variable names. Default is NULL.

get_ex

Logical ,if TRUE, return a list contains names of excluded variables.

Value

A list contains names of variables

See Also

get_x_list

Examples

x_list = get_names(dat = UCICreditCard, types = c('factor', 'character'),
ex_cols = c("default.payment.next.month","ID$|_date$"), get_ex = FALSE)
x_list = get_names(dat = UCICreditCard, types = c('numeric', 'character', "integer"),
ex_cols = c("default.payment.next.month", "ID$|SEX "), get_ex = FALSE)

[Package creditmodel version 1.3.1 Index]