sdcMicroObj-class
from Numeric to Factor or from Factor to NumericR/GUIfunctions.R
varToFactor.Rd
Change the scale of a variable
varToFactor(obj, var)
varToNumeric(obj, var)
object of class sdcMicroObj-class
name of the keyVariable to change
the modified sdcMicroObj-class
## for objects of class sdcMicro:
data(testdata2)
sdc <- createSdcObj(testdata2,
keyVars=c('urbrur','roof','walls','water','electcon','relat','sex'),
numVars=c('expend','income','savings'), w='sampling_weight')
sdc <- varToFactor(sdc, var="urbrur")