set.sdcMicroObj {sdcMicro}R Documentation

set.sdcMicroObj

Description

modify sdcMicroObj-class-objects depending on argument type

Usage

set.sdcMicroObj(object, type, input)

Arguments

object

a sdcMicroObj-class-object

type

a character vector of length 1 defining what to calculate|return|modify. Allowed types are listed below and the slot with the corresponding name will be replaced by the content of input.

  • origData:

  • keyVars:

  • pramVars:

  • numVars:

  • weightVar:

  • hhId:

  • strataVar:

  • sensibleVar:

  • manipPramVars:

  • manipNumVars:

  • manipGhostVars:

  • manipStrataVar:

  • risk:

  • utility:

  • pram:

  • localSuppression:

  • options:

  • prev:

  • set:

  • additionalResults:

  • deletedVars:

input

a list depending on argument type. The content of the list must match the allowed data-type of the slot in the sdcMicroObj-class-object that should be replaced.

Value

a sdcMicroObj-class-object

Examples

sdc <- createSdcObj(testdata2,
  keyVars=c('urbrur','roof','walls','water','electcon','relat','sex'),
  numVars=c('expend','income','savings'), w='sampling_weight')
ind_pram <- match(c("sex"), colnames(testdata2))
get.sdcMicroObj(sdc, type="pramVars")
sdc <- set.sdcMicroObj(sdc, type="pramVars", input=list(ind_pram))
get.sdcMicroObj(sdc, type="pramVars")

[Package sdcMicro version 5.7.8 Index]