View source: R/localSuppression.R
plot.localSuppression | R Documentation |
This function creates barplots to display the number of suppressed values
in categorical key variables to achieve k
-anonymity.
## S3 method for class 'localSuppression'
plot(x, ...)
x |
object of derived from |
... |
Additional arguments, currently available are:
|
a ggplot
plot object
Bernhard Meindl, Matthias Templ
localSuppression()
data(francdat)
#l1 <- localSuppression(obj = francdat, k = 2, keyVars = c(2, 4:6))
#l1
#plot(l1)
#
### with details of suppression by strata
#data(testdata2)
#testdata2$ageG <- cut(testdata2$age, 5, labels = paste0("AG",1:5))
#keyVars <- c("urbrur", "roof", "walls", "water", "electcon", "relat", "sex")
#strataVars <- "ageG"
#inp <- testdata2[, c(keyVars, strataVars)]
#ls <- localSuppression(inp, keyVars = 1:7, strataVars = 8)
#print(ls)
#plot(ls)
#plot(ls, showDetails = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.