bin.auto: Bin numeric variables using 'bin.rpart' and 'bin.custom'...

Description Usage Arguments Details Value Examples

View source: R/bin_auto.R

Description

bin.rpart is tried first. If no bin is found, then bin.custom is used to bin the variable using the cut pionts of 20

Usage

1
bin.auto(data, x_num = NULL, y)

Arguments

data

The data frame used for binning

x_num

The list of numeric variables. If it is NULL, then all variables except y are used.

y

The binary outputs

Details

bin.auto automatically bin a list of numeric variables, and return the cut points and bins

Value

a list containing cut points and bins

Examples

1
2
3
data <- rpart::stagec
x_num <- c('age', 'pgtime')
bin.auto(data, x_num = x_num, y = 'pgstat')

JianhuaHuang/streamit documentation built on May 7, 2019, 10:40 a.m.