get.sdcMicroObj: get.sdcMicroObj

View source: R/methods.r

get.sdcMicroObjR Documentation

get.sdcMicroObj

Description

extract information from sdcMicroObj-class-objects depending on argument type

Usage

get.sdcMicroObj(object, type)

Arguments

object

a sdcMicroObj-class-object

type

a character vector of length 1 defining what to calculate|return|modify. Allowed types are are all slotNames of obj.

Value

a slot of a sdcMicroObj-class-object depending on argument type

Examples

sdc <- createSdcObj(testdata2,
  keyVars=c('urbrur','roof','walls','water','electcon','relat','sex'),
  numVars=c('expend','income','savings'), w='sampling_weight')
sl <- slotNames(sdc)
res <- sapply(sl, function(x) get.sdcMicroObj(sdc, type=x))
str(res)

sdcTools/sdcMicro documentation built on March 15, 2024, 12:32 p.m.