library(riskr)
data(credit)

variable <-  credit$age 
target <- credit$bad 

bin <- bin_sup(variable, target)

names(bin)
## [1] "data"             "tree"             "type"            
## [4] "variable_new"     "variable_new_woe"
head(bin$variable_new)
## [1] "group_6" "group_3" "group_3" "group_4" "group_5" "group_6"
gg_ba2(bin$variable_new, target)

sessionInfo()
## R version 3.1.3 (2015-03-09)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 8 x64 (build 9200)
## 
## locale:
## [1] LC_COLLATE=Spanish_Chile.1252  LC_CTYPE=Spanish_Chile.1252   
## [3] LC_MONETARY=Spanish_Chile.1252 LC_NUMERIC=C                  
## [5] LC_TIME=Spanish_Chile.1252    
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] ggplot2_1.0.1.9003 riskr_1.0         
## 
## loaded via a namespace (and not attached):
##  [1] assertthat_0.1   colorspace_1.2-6 DBI_0.3.1        digest_0.6.8    
##  [5] dplyr_0.4.3      evaluate_0.8     Formula_1.2-1    grid_3.1.3      
##  [9] gtable_0.1.2     htmltools_0.2.6  knitr_1.11       labeling_0.3    
## [13] lazyeval_0.1.10  magrittr_1.5     munsell_0.4.2    parallel_3.1.3  
## [17] partykit_1.0-4   plyr_1.8.3       R6_2.1.1         Rcpp_0.12.1     
## [21] rmarkdown_0.8.1  scales_0.3.0     splines_3.1.3    stringi_1.0-1   
## [25] stringr_1.0.0    survival_2.38-1  tools_3.1.3