getInfo {sdcTable} | R Documentation |
Retrieve information in sdcProblem
or problemInstance
objects
Description
Function getInfo()
is used to extract values from
sdcProblem
or problemInstance
objects
Usage
getInfo(object, type)
Arguments
object |
an object of class |
type |
a scalar character specifying the information which should be
returned. If
|
Value
manipulated data depending on arguments object
and type
Author(s)
Bernhard Meindl bernhard.meindl@statistik.gv.at
Examples
# define an example problem with two hierarchies
p <- sdc_testproblem(with_supps = FALSE)
# apply primary suppression
p <- primarySuppression(p, type = "freq", maxN = 3)
# `p` is an `sdcProblem` object
print(class(p))
for (slot in c("lb", "ub", "LPL", "SPL", "UPL", "sdcStatus",
"freq", "strID", "numVars", "w")) {
message("slot: ", shQuote(slot))
print(getInfo(p, type = slot))
}
# protect the cell and extract results
p_protected <- protectTable(p, method = "SIMPLEHEURISTIC")
for (slot in c("finalData", "nrNonDuplicatedCells", "nrPrimSupps",
"nrSecondSupps", "nrPublishableCells", "suppMethod")) {
message("slot: ", shQuote(slot))
print(getInfo(p_protected, type = slot))
}