Description Usage Arguments Examples
View source: R/aplica_cortes_nominales.R
apply the cuts obtained with aplica_agrupa_nominal to a list of new variables .
1 | aplica_cortes_nominales(tbla_cortes_variables_nom, tbl, campo_merge)
|
tbla_cortes_variables_nom |
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(c('a','b','c','d','e'),100/5),
valor=c( as.numeric(rep(runif(90), 1)>.5) , rep(0, 5), rep(1, 5)) ,
grupo2=rep(c('aa','bb','cc','cc','cc'),100/5))
tbl_grupos=aplica_agrupa_nominal(train_tbl=tbla, char_cols=c('grupo1', 'grupo2'), target_name='valor', lim_cant_categ=20, limite=0.05, symbol_to_split = '%#%')
aplica_cortes_nominales(tbla_cortes_variables_nom=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.