sdcTable (version 0.20.5)

changeCellStatus: change anonymization status of a specific cell

Description

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

Usage

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

Examples

Run this code
# 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')))

Run the code above in your browser using DataLab