Extract sample frequency counts (fk) or estimated population frequency counts (Fk)

freq(obj, type = "fk")

Arguments

obj

an sdcMicroObj-class-object

type

either 'fk' or 'FK'

Value

a vector containing sample frequencies or weighted frequencies

Author

Bernhard Meindl

Examples

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