Learn R Programming

sdcTable (version 0.29)

cellInfo: query information for a specific cell in safeObj-class objects

Description

Function cellInfo is used to query information for a single table cell for objects of class safeObj-class.

Usage

cellInfo(object, characteristics, varNames, verbose = FALSE)

Arguments

object

an object of class safeObj-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

verbose

logical vector of length 1 defining verbosity, defaults to 'FALSE'

Value

a list containing the following calculated information

  • cellID: numeric vector of length 1 specifying the index of the cell within the final result dataset

  • data: a data.frame containing a single row with the index of the table cell of interest

  • primSupp: logical vector of length 1 that is 'TRUE' if the cell is a primary sensitive cell and 'FALSE' otherwise

  • secondSupp: logical vector of length 1 that is 'TRUE' if the cell is a secondary suppressed cell and 'FALSE' otherwise

Examples

Run this code
# NOT RUN {
# load protected data (as created in the example
# of \code{\link{protectTable}})
sp <- searchpaths()
fn <- paste(sp[grep("sdcTable", sp)], "/data/protectedData.RData", sep="")
protectedData <- get(load(fn))
characteristics <- c('male', 'D')
varNames <- c('gender', 'region')
info <- cellInfo(protectedData, characteristics, varNames, verbose=FALSE)

# show the info about this cell
str(info)

# }

Run the code above in your browser using DataLab