anonymize_data: anonymize_data

Description Usage Arguments Details

View source: R/anonymize_data.R

Description

Function for anonymizing tabular data

Usage

1
anonymize_data(data, col_names = NULL, algo = "md5", save = FALSE)

Arguments

data

A data frame containing the data

col_names

A character vector with the names of the columns to be anonymized

algo

The algorithm to be used in case the data are going to be hashed. Default is "random". See details for options

save

Whether a new file with the anonymized data should be saved. Default is FALSE

Details

The function will take the selected columns and fill them in with either random numbers or one of the encryption algorithms. Specifally, the different options for the algo argument are: random, md5, sha1, crc32, sha256, sha512, xxhash32, xxhash64, and murmur32.

In case the algo argument is set to random, the algorithm will generate random numbers from a gaussian distribution with a mean of 0 and a standard deviation of 1 – this is the default arguments in the base::rnorm function.

In case the save argument is set to TRUE, a csv file is created with the anonymized data.


AngelosPsy/pssr documentation built on June 27, 2020, 8:06 p.m.