#devtools::install_github("jbkunst/riskr")

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] (37,46] (21,28] (21,28] (28,32] (32,37] (37,46]
## 9 Levels: (-Inf,19] (19,21] (21,28] (28,32] (32,37] (37,46] ... (95, Inf]
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     bitops_1.0-6       caTools_1.17.1    
##  [4] colorspace_1.2-6   DBI_0.3.1          digest_0.6.8      
##  [7] dplyr_0.4.3        evaluate_0.8       Formula_1.2-1     
## [10] gdata_2.17.0       gplots_2.17.0      grid_3.1.3        
## [13] gtable_0.1.2       gtools_3.4.2       htmltools_0.2.6   
## [16] KernSmooth_2.23-14 knitr_1.11         labeling_0.3      
## [19] lazyeval_0.1.10    magrittr_1.5       munsell_0.4.2     
## [22] parallel_3.1.3     partykit_1.0-4     plyr_1.8.3        
## [25] R6_2.1.1           Rcpp_0.12.2        rmarkdown_0.8.1   
## [28] ROCR_1.0-7         scales_0.3.0       splines_3.1.3     
## [31] stringi_1.0-1      stringr_1.0.0      survival_2.38-1   
## [34] tools_3.1.3