Learn R Programming

sdcMicro (version 4.0.1)

removeDirectID: Remove certain variables from the data set inside a sdc object.

Description

Delete variables without changing anything else in the sdcObject.

Usage

removeDirectID(obj, var)

Arguments

obj
object of class 'sdcMicroObj
var
name of the variable(s) to remove

Value

  • the modified sdcMicroObj

Examples

Run this code
## for objects of class sdcMicro:
data(testdata2)
sdc <- createSdcObj(testdata, keyVars=c('urbrur','roof'), 
           numVars=c('expend','income','savings'), w='sampling_weight')
sdc <- removeDirectID(sdc, var="age")

Run the code above in your browser using DataLab