Description Usage Arguments Examples
View source: R/aplica_cortes_ordinales.R
apply the cuts obtained with aplica_agrupa_nominal to a list of new variables .
1 | aplica_cortes_ordinales(tbla_cortes_variables_ord, tbl, campo_merge)
|
tbla_cortes_variables_ord |
table with cuts return by aplica_agrupa_nominal. |
tbl |
table with data to apply the cuts. |
campo_merge |
name of the variable used to merge the result and the data (index). |
1 2 3 4 5 6 7 | tbla<-data.frame(
id=1:100,
grupo1=rep(1:5,100/5),
valor=c( as.numeric(rep(runif(90), 1)>.5) , rep(0, 5), rep(1, 5)) ,
grupo2=rep(c(11,22,33,33,33),100/5))
tbl_grupos=aplica_agrupa_ordinal(train_tbl=tbla, num_cols=c('grupo1', 'grupo2'), target_name='valor', num_ini_groups=100, limite=0.05)
aplica_cortes_ordinales(tbla_cortes_variables_ord=tbl_grupos, tbl=tbla, campo_merge='id')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.