Learn R Programming

sdcTable (version 0.10.3)

primarySuppression: perform primary suppression in sdcProblem-class-objects

Description

Function primarySuppression is used to identify and suppress primary sensitive table cells in sdcProblem-class objects. Argument type allows to select a rule that should be used to identify primary sensitive cells. At the moment it is possible to identify and suppress sensitive table cells using the frequency-rule, the nk-dominance rule and the p-percent rule.

Usage

primarySuppression(object, type, ...)

Arguments

object
type
character vector of length 1 defining the primary suppression rule. Allowed types are:
  • freq: apply frequency rule with parametersmaxNandallowZeros
  • nk: apply nk-dominance rule with p
...
parameters used in the identification of primary sensitive cells. Parameters that can be modified|changed are:
  • maxN: numeric vector of length 1 used when applying the frequency rule. All cells having counts <=maxN

Value

Examples

Run this code
# load micro data
sp <- searchpaths()
fn <- paste(sp[grep("sdcTable", sp)], "/data/microData1.RData", sep="")
microData <- get(load(fn))

# load problem (as it was created in the example in \code{\link{makeProblem}})
fn <- paste(sp[grep("sdcTable", sp)], "/data/problem.RData", sep="")
problem <- get(load(fn))

# we have a look at the table
print(table(microData))

# cell with region=='A' and gender=='female' has 2 units contributing to it
# this cell should be considered senstive!
problem <- primarySuppression(problem, type='freq', maxN=3)

# looking at anonymization states
print(table(getInfo(problem, type='sdcStatus')))

# we see that exactly one cell is primary suppressed (sdcStatus=='u') and
# the remaining cells are possible candidates for secondary suppression ('s')

Run the code above in your browser using DataLab