Extract sample frequency counts (fk) or estimated population frequency counts (Fk)
freq(obj, type = "fk")
an sdcMicroObj-class
-object
either 'fk'
or 'FK'
a vector containing sample frequencies or weighted frequencies
data(testdata)
sdc <- createSdcObj(testdata,
keyVars=c('urbrur','roof','walls','relat','sex'),
pramVars=c('water','electcon'),
numVars=c('expend','income','savings'), w='sampling_weight')
head(freq(sdc, type="fk"))
#> [1] 412 394 681 681 152 146
head(freq(sdc, type="Fk"))
#> [1] 41200 39400 68100 68100 15200 14600