Function changeCellStatus
allows to change|modify the anonymization state
of single table cells for objects ofs class sdcProblem-class
.
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
!
# 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')))#> #> s u #> 14 1# setting the specific cell as primary sensitive problem <- changeCellStatus(problem, characteristics, varNames, rule, verbose)#> --> The cell with ID= 14 and Frequency 11 has been set to u .#> #> s u #> 13 2