suppress: Suppress Identifiable Information

Description Usage Arguments Details Value Functions Examples

View source: R/suppress.R

Description

Suppress Identifiable Information

Usage

1
2
3
4
5
6
7
suppress(x, rows = NULL, cols = NULL, over = c("both"), order = 1)

suppressRows(x, rows = NULL, order = 1)

suppressCols(x, cols = NULL, order = 1)

suppressColumns(x, cols = NULL, order = 1)

Arguments

x

a data.frame

rows

the rows that are to be removed - may be numeric (row indices) or character (row names). An optional parameter - use if automated suppression is not desired

cols

the columns that are to be removed - may be numeric (column indices) or character (column names). An optional parameter - use if automated suppression is not desired

over

use "row" if suppression of rows is desired, "col" is suppression of columns is desired, or "both" for suppression of both

order

the order of suppression. See details

Details

When anonymizing data, it is often desirable to remove variables that allow for individuals to be easily identified. It may also be desirable to remove individuals from the data if they contain unique attributes that make them easy to identify. This function assists in anonymization by removing rows or columns that fall under these categories. The rows and columns that are desired to be removed may be specified as a parameter, in which case the function simply removes the specified rows and columns. If no rows or columns are supplied, the function will remove all rows containing completely unique observations and/or columns containing identifiable information. The order parameter is used to increase the anonymity of the data. It can be thought of as the minimum number of times a value must occur for it to not be considered identifiable. If a column contains a variable that does not occur at least order number of times, that column is removed. Similarly, if a row does not occur more than order number of times, then that row is removed.

Value

data.frame with with rows and/or columns removed

Functions

Examples

1
2
3
4
suppress(data)
suppress(data, over=c("rows"))
suppressRow(data, rows=c(29,34,70))
suppressCol(data, order=3)

shuklak13/anonymizeR documentation built on May 29, 2019, 9:27 p.m.