sdcMicro (version 4.6.0)

renameVars: Change the name of levels of a keyVariable in an object of class sdcMicroObj-class

Description

Change the labels of levels.

Usage

renameVars(obj, var, before, after)

Arguments

obj
object of class sdcMicroObj-class
var
name of the keyVariable to change
before
vector of levels before
after
vector of levels after

Value

the modified sdcMicroObj-class

Methods

list("signature(obj = \"sdcMicroObj\")")

Examples

Run this code
## 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 <- renameVars(sdc, var="urbrur", before=2, after=78)

Run the code above in your browser using DataLab