changeCellStatus(sdcTable)
changeCellStatus()所属R语言包:sdcTable
change anonymization status of a specific cell
更改匿名状态的一个特定的单元
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Function changeCellStatus allows to change|modify the anonymization state of single table cells for objects ofs class sdcProblem-class.
函数changeCellStatus可以改变的对象OFS类sdcProblem-class修改单个表格单元格的匿名状态。
用法----------Usage----------
changeCellStatus(object, characteristics, varNames, rule,
verbose = FALSE)
参数----------Arguments----------
参数:object
an object of class sdcProblem-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.
指定一个有效的的匿名代码(U,Z,X,S)的单元在考虑应设置长度为1的字符向量。
参数:verbose
logical vector of length 1 defining verbosity, defaults to 'FALSE'
逻辑向量长度为1的定义冗长,默认为“假”
值----------Value----------
a sdcProblem-class object
sdcProblem-class对象
注意----------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!
重要提示:i个元素的参数characteristics使用所需的特性的三维变量在i个位置参数varNames!
(作者)----------Author(s)----------
Bernhard Meindl <a href="mailto:bernhard.meindl@statistik.gv.at">bernhard.meindl@statistik.gv.at</a>
实例----------Examples----------
## Not run: [#不运行:]
# 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[我们要标记的单元区域=D和性别=“男”初级敏感]
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')))
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|