aplica_cortes_nominales: aplica_cortes_nominales

Description Usage Arguments Examples

View source: R/aplica_cortes_nominales.R

Description

apply the cuts obtained with aplica_agrupa_nominal to a list of new variables .

Usage

1
aplica_cortes_nominales(tbla_cortes_variables_nom, tbl, campo_merge)

Arguments

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).

Examples

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')

GabyP/agrupaVariables documentation built on Sept. 25, 2020, 8:04 p.m.