Learn R Programming

sdcMicro (version 3.1.2)

localSuppression: Local Suppression to obtain k-anonymity

Description

Algorithm to achieve k-anonymity by performing local suppression.

Usage

localSuppression(x, keyVars, w=NULL, k=2, importance=NULL)

Arguments

x
data frame or matrix
keyVars
numeric vector specifying indices of (categorical) key-variables
w
index specifying weight-variable in input data x
k
threshold for k-anonymity
importance
numeric vector of numbers between 1 and n (n=length of vector keyVars). This vector represents the "importance" of variables that should be used for local suppression in order to obtain k-anonymity. key-variables with importance=1 will - if possibl

Value

  • Manipulated data set with suppressions that has k-anonymity with respect to specified key-variables

Details

The algorithm provides a k-anonymized data set by suppressing values in key variables. The algorithm tries to find an optimal solution to suppress as few values as possible and considers the specified importance vector. If not specified, the importance vector is constructed in a way such that key variables with a high number of characteristics are considered less important than key variables with a low number of characteristics.

Examples

Run this code
data(francdat)
## Local Suppression            
localS <- localSuppression(francdat, keyVar=c(4,5,6))
localS
plot(localS)

Run the code above in your browser using DataLab