Learn R Programming

vtreat (version 0.5.16)

getNewVarNames: Return a list of new treated variable names (coresponding to optional original variable names)

Description

Return a list of new treated variable names (coresponding to optional original variable names)

Usage

getNewVarNames(treatments, origVarNames = c())

Arguments

treatments
the treatments slot from a treatmentplan object
origVarNames
optional restrict to only derived variable originating from these original variables (null is no restriction)

Value

  • list of new treated variable names

See Also

designTreatmentsC designTreatmentsN

Examples

Run this code
dTrainN <- data.frame(x=c('a','a','a','a','b','b','b'),
    z=c(1,2,3,4,5,6,7),y=c(0,0,0,1,0,1,1))
dTestN <- data.frame(x=c('a','b','c',NA),
    z=c(10,20,30,NA))
treatmentsN = designTreatmentsN(dTrainN,colnames(dTrainN),'y')

Run the code above in your browser using DataLab