auto.bin: Automatic Binning

Description Usage Arguments Details Examples

View source: R/auto.bin_Function.R

Description

Creates bins automatically by using the output of the bin function through the %>% operator. An example is presented below.

Usage

1
auto.bin(sbin, df = ds)

Arguments

sbin

The output of the bin function. The %>% operator automatically deals with this argument.

df

The desired dataset to which the automatic binning should be applied to.

Details

This function is intended to help the user achieve efficiency when binning variables. By first using the bin function to determine the optimum binnings for the respective variable, the user can then pass the bin function into the auto.bin function by using the %>% operator and the result is an object that can be assigned back to the dataset or a stand-alone object.

This function also deals with missing values (NA).

Examples

1
2
df$var_CC <- 
  bin(x = "var", y = "target", df = df, type = "a") %>% auto.bin()

Ehsan-F/R-Mixtape documentation built on June 24, 2020, 12:22 a.m.