Description Usage Arguments Details
View source: R/anonymize_data.R
Function for anonymizing tabular data
1 | anonymize_data(data, col_names = NULL, algo = "md5", save = FALSE)
|
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 |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.