getInfo: query information from objects

Description Usage Arguments Value Author(s) Examples

Description

Function getInfo is used to query information from objects of class sdcProblem-class, problemInstance-class or safeObj-class

Usage

1
getInfo(object, type)

Arguments

object

a sdcProblem-class object, problemInstance-class object or safeObj-class object.

type

a character vector of length 1 specifying the information which should be returned.

  • if argument object is of class sdcProblem-class or problemInstance-class, valid choices are:

    • lb: slot 'lb' of input object if it is of class problemInstance-class or this slot within slot 'problemInstance' if object is of class sdcProblem-class

    • ub: slot 'ub' of input object if it is of class problemInstance-class or this slot within slot 'problemInstance' if object is of class sdcProblem-class

    • LPL: slot 'LPL' of input object if it is of class problemInstance-class or this slot within slot 'problemInstance' if object is of class sdcProblem-class

    • SPL: slot 'SPL' of input object if it is of class problemInstance-class or this slot within slot 'problemInstance' if object is of class sdcProblem-class

    • UPL: slot 'UPL' of input object if it is of class problemInstance-class or this slot within slot 'problemInstance' if object is of class sdcProblem-class

    • sdcStatus: slot 'sdcStatus' of input object if it is of class problemInstance-class or this slot within slot 'problemInstance' if object is of class sdcProblem-class

    • freq: slot 'freq' of input object if it is of class problemInstance-class or this slot within slot 'problemInstance' if object is of class sdcProblem-class

    • strID: slot 'strID' of input object if it is of class problemInstance-class or this slot within slot 'problemInstance' if object is of class sdcProblem-class

    • numVars: slot 'numVars' of input object if it is of class problemInstance-class or this slot within slot 'problemInstance' if object is of class sdcProblem-class

    • w: slot 'w' of input object if it is of class problemInstance-class or this slot within slot 'problemInstance' if object is of class sdcProblem-class

  • if argument object is of class safeObj-class, valid choices are:

    • finalData: slot 'finalData' of input object of class safeObj-class

    • nrNonDuplicatedCells: slot 'nrNonDuplicatedCells' of input object of class safeObj-class

    • nrPrimSupps: slot 'nrPrimSupps' of input object of class safeObj-class

    • nrSecondSupps: slot 'nrSecondSupps' of input object of class safeObj-class

    • nrPublishableCells: slot 'nrPublishableCells' of input object of class safeObj-class

    • suppMethod: slot 'suppMethod' of input object of class safeObj-class

Value

manipulated data dependend on arguments object and type

Author(s)

Bernhard Meindl bernhard.meindl@statistik.gv.at

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# load problem (as it was created in the example
# of \code{\link{makeProblem}})
sp <- searchpaths()
fn <- paste(sp[grep("sdcTable", sp)], "/data/problem.RData", sep="")
problem <- get(load(fn))

# problem is an object of class \code{\link{sdcProblem-class}}
print(class(problem))

for (slot in c('lb','ub','LPL','SPL','UPL','sdcStatus',
  'freq', 'strID', 'numVars', 'w')) {
  cat('slot', slot,':\n')
  print(getInfo(problem, type=slot))
}

# extracting information for objects of class \code{\link{safeObj-class}}
fn <- paste(sp[grep("sdcTable", sp)], "/data/protectedData.RData", sep="")
protectedData <- get(load(fn))
for (slot in c('finalData', 'nrNonDuplicatedCells', 'nrPrimSupps',
  'nrSecondSupps', 'nrPublishableCells', 'suppMethod')) {
  cat('slot', slot,':\n')
  print(getInfo(protectedData, type=slot))
}

bernhard-da/sdcTable documentation built on June 10, 2019, 4:54 a.m.