Learn R Programming

creditmodel (version 1.0)

get_names: Get Variable Names

Description

get_names is for getting names of particular classes of variables

Usage

get_names(dat, types = c("numeric", "integer", "double"),
  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

Run this code
# NOT RUN {
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,
ex_cols = c("default.payment.next.month","ID$|_date$"), get_ex = FALSE)
# }

Run the code above in your browser using DataLab