cy_Anonymize: Anonymize Names

Description Usage Arguments Value Examples

Description

Anonymize column of your choice to alpha-numeric code (uses digest package)

Usage

1
cy_Anonymize(df, col_to_anon = "name", algo = "crc32")

Arguments

df

The dataframe you wish to anonymize

col_to_anon

The column to anonymize. The default 'name'.

algo

The algorithms to be used. The available choices are md5 (default), sha1, crc32, sha256, sha512, xxhash32, xxhash64, and murmur32. See the digest R package documentation for details.

Value

Returns the dataframe with a new anonymized column named 'id'.

Examples

1
2
3
4
rawdf <- data.frame(name = c("John", "Jon", "Jonathan", "Jon"),
      year = c(2010,2010,2011,2011), pay = c(5000,7000,8000,7000))
cy_Anonymize(rawdf, "name")
anondf <- cy_Anonymize(df=sals18, col_to_anon = "place_of_residence")

vanichols/CyChecks documentation built on June 23, 2019, 11:38 p.m.