changeCellStatus: change anonymization status of a specific cell

Description Usage Arguments Value Note Author(s) Examples

Description

Function changeCellStatus allows to change|modify the anonymization state of single table cells for objects ofs class sdcProblem-class.

Usage

1
2
changeCellStatus(object, characteristics, varNames, rule,
  verbose = FALSE)

Arguments

object

an object of class sdcProblem-class

characteristics

a character vector specifying characteristics of the table cell that should be identified for each dimensional variable defining the table

varNames

a character vector specifying variable names of dimensional variables defining the tables

rule

character vector of length 1 specifying a valid anonymization code ('u', 'z', 'x', 's') to which the the cell under consideration should be set.

verbose

logical vector of length 1 defining verbosity, defaults to 'FALSE'

Value

a sdcProblem-class object

Note

Important: the i-th element of argument characteristics is uses as the desired characteristic for the dimensional variable specified at the i-th position of argument varNames!

Author(s)

Bernhard Meindl bernhard.meindl@statistik.gv.at

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# load primary suppressed data (as created in the example
# of \code{\link{primarySuppression}})
sp <- searchpaths()
fn <- paste(sp[grep("sdcTable", sp)], "/data/problemWithSupps.RData", sep="")
problem <- get(load(fn))

# we want to mark the cell region='D' and gender='male' primary sensitive
characteristics <- c('D', 'male')
varNames <- c('region', 'gender')
verbose <- TRUE
rule <- 'u'

# looking at the distribution of anonymization states before...
print(table(getInfo(problem, 'sdcStatus')))

# setting the specific cell as primary sensitive
problem <- changeCellStatus(problem, characteristics, varNames, rule, verbose)

# having a second look at the anonymization states
print(table(getInfo(problem, 'sdcStatus')))

bernhard-da/sdcTable documentation built on June 10, 2019, 4:54 a.m.