binner: Contineous Variable Binner

Description Usage Arguments Value Examples

Description

Contineous Variable Binner

Usage

1
2
binner(x, y = NULL, lower, upper, by, min.obs, sep = "-",
  above.char = "+", digits)

Arguments

x

Variable to bin

y

Conditional binnig on depedent variable

lower

Lower bound of bins

upper

Uper bound of bins

by

speration between bins

min.obs

Minimum Observation required in each bin

sep

Bin bound seperator

above.char

Charcter to denote value beyond upper bound

digits

No of digits to be considered for binning

Value

A binned categorical vector of x

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
binner(c(1,2,3,4,5,6,7,8,9,10,11,13,15,77,99))
vec <- c(1,1,1,1,1,2,2,2,2,2,2,5,5,5,6,6,7,8,9,9,10,11,13,15,77,99)
binner(vec)
binner(vec,by=7)
binner(vec,by=3)
binner(vec,by=3,upper=20)

y <- sample(0:1,NROW(vec_),replace = T)
binner(vec,y)
binner(seq(0,100,1),by=12)

jkapila/vcvn documentation built on May 19, 2019, 4:05 p.m.