Learn R Programming

sdcTable (version 0.6.4)

summary.safeTable: summary.safeTable

Description

summary method for objects of class safeTable.

Usage

## S3 method for class 'safeTable':
summary(object, ...)

Arguments

object
object from class safeTable
...
additional parameters. Not used yet.

Value

  • Manipulated data.

Details

object is an object of class safeTable. The summary functions returns several statistics from the anonymisation process.

Examples

Run this code
N <- 100
# generate micro-data
V1 <- sample(c("011", "012","013","021","022","023","024"), N, replace=TRUE)
V2 <- sample(c("01", "02"), N, replace=TRUE)
V3 <- sample(c("01", "02"), N, replace=TRUE)

microDat <- data.frame(V1=V1,V2=V2,V3=V3, numVal=abs(round(rnorm(N, 500, 200),2)))

# dimensional information (level1-level4
h1 <- c("@@", "@@@","@@@","@@@","@@", "@@@","@@@","@@@","@@@")
l1 <- c("010", "011", "012","013","020", "021","022","023","024")
df1 <- data.frame(h=h1, l=l1) #V1

h2 <- c("@@", "@@")
l2 <- c("m", "w")
df2 <- data.frame(h=h2, l=l2) #V2

h3 <- c("@@", "@@")
l3 <- c("A", "B")
df3 <- data.frame(h=h3, l=l3) #V3

suppRule_Freq <- c(3,0)

outObj <- prepareInput(microDat, filenames=NULL, hierFrames=list(V2=df2,V3=df3,V1=df1), numVar="numVal", suppRule_Freq=suppRule_Freq)
result <- protectTable(outObj, method="HYPERCUBE")
class(result)
summary(result)

Run the code above in your browser using DataLab