smbinning.sql: SQL Code

Description Usage Arguments Value Examples

View source: R/smbinning.R

Description

It outputs a SQL code to facilitate the generation of new binned characetristic in a SQL environment. User must define table and new characteristic name.

Usage

1

Arguments

ivout

An object generated by smbinning.

Value

A text with the SQL code for binning.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Load library and its dataset
library(smbinning)

# Example 1: Binning a numeric variable
result=smbinning(df=chileancredit,y="fgood",x="cbs1") # Run and save result
smbinning.sql(result)

# Example 2: Binning for a factor variable
result=smbinning.factor(df=chileancredit,x="inc",y="fgood",maxcat=11)
smbinning.sql(result)

# Example 3: Customized binning for a factor variable
result=smbinning.factor.custom(
  df=chileancredit,x="inc",y="fgood",
  c("'W01','W02'","'W03','W04','W05'",
    "'W06','W07'","'W08','W09','W10'"))
smbinning.sql(result)

smbinning documentation built on Dec. 1, 2017, 9:02 a.m.