Learn R Programming

sdcMicro (version 4.0.2)

freq-methods: Print and Extractor Functions for objects of class 'sdcMicroObj'

Description

Descriptive print function for Frequencies, local Supression, Recoding, categorical risk and numerical risk.

Usage

print(x,...)
freq(obj,type="fk")

Arguments

x
An object of class 'sdcMicroObj'
obj
An object of class 'sdcMicroObj'
type
Selection of the content to be returned or printed-
...
the type argument for the print method

Details

Possible values for the type argument of the print function are: "freq": for Frequencies, "ls": for Local Supression output, "recode":for Recodes, "risk": forCategorical risk and "numrisk": for Numerical risk.

Possible values for the type argument of the freq function are: "fk": Sample frequencies and "Fk": weighted frequencies.

Examples

Run this code
data(testdata)
  sdc <- createSdcObj(testdata, keyVars=c('urbrur','roof','walls','water','electcon','relat','sex'), numVars=c('expend','income','savings'), w='sampling_weight')
  fk=freq(sdc)
  Fk=freq(sdc,type="Fk")
  print(sdc)
  print(sdc,type="ls")
  print(sdc,type="recode")
  print(sdc,type="risk")
  print(sdc,type="numrisk")

Run the code above in your browser using DataLab