Description Usage Arguments Value Note Author(s) Examples
Function changeCellStatus
allows to change|modify the anonymization state
of single table cells for objects ofs class sdcProblem-class
.
1 2 | changeCellStatus(object, characteristics, varNames, rule,
verbose = FALSE)
|
object |
an object of 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' |
a sdcProblem-class
object
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
!
Bernhard Meindl bernhard.meindl@statistik.gv.at
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')))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.