Description Usage Arguments Value Examples
View source: R/deidentify_methods.R
The deidentify_text method offers a flexible approach to encryption offering the user the option to encrypt text columns using either openssl or sodium. The encryption path chosen depends on the encryption key generated by the user. For example, if a user generates an aes_key, and passes it to deidentify_text, aes encryption will be automatically applied. The function will return a dataframe with the an encrypt_id suffix added to the end of the column name. Thus, a user will have to actively remove the unencrypted columns manually.
1 | deidentify_text(.data, key, cols_to_encrypt = NULL)
|
.data |
a data frame |
key |
A cyphr key generated from the cyphr package |
cols_to_encrypt |
This is specific to data.frames. This should be a character vector specifying the names of the desired columns to encrypt. |
depending on the input, an object of the same class. If you input a data.frame, you will get a data.frame with columns with a enc suffix
1 2 3 4 5 6 | ## Not run:
data("initiations")
aes_key <- gen_aes_key(24)
deidentify_text(initiations, "case_participant_id", aes_key)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.