R/aux_functions.r
extractManipData.Rd
Extract the manipulated data from an object of class sdcMicroObj-class
extractManipData(
obj,
ignoreKeyVars = FALSE,
ignorePramVars = FALSE,
ignoreNumVars = FALSE,
ignoreGhostVars = FALSE,
ignoreStrataVar = FALSE,
randomizeRecords = "no"
)
object of class sdcMicroObj-class
If manipulated KeyVariables should be returned or the unchanged original variables
if manipulated PramVariables should be returned or the unchanged original variables
if manipulated NumericVariables should be returned or the unchanged original variables
if manipulated Ghost (linked) Variables should be returned or the unchanged original variables
if manipulated StrataVariables should be returned or the unchanged original variables
(logical) specifies, if the output records should be randomized. The following options are possible:
default, no randomization takes place
records are just randomly swapped.
if slot 'hhId' is not NULL
, the clusters defined by this variable are randomized across the dataset. If
slot 'hhId' is NULL
, the records or the dataset are randomly changed.
if slot 'hhId' is not NULL
, the clusters defined by this variable are randomized across the dataset and
additionally, the order of records within the clusters are also randomly changed. If slot 'hhId' is NULL
, the records or the dataset are
randomly changed.
a data.frame
containing the anonymized data set
## 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")
dataM <- extractManipData(sdc)