Learn R Programming

sdcMicro (version 5.6.1)

freq: Freq

Description

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

Usage

freq(obj, type = "fk")

Value

a vector containing sample frequencies or weighted frequencies

Arguments

obj

an sdcMicroObj-class-object

type

either 'fk' or 'FK'

Author

Bernhard Meindl

Examples

Run this code
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"))
head(freq(sdc, type="Fk"))

Run the code above in your browser using DataLab