add_pseudonymize | R Documentation |
add_pseudonymize()
adds a psuedonymization step to a transformation pipeline.
When ran as a transformation, terms that have not been seen before are given a new
random alpha-numeric string while terms that have been previously transformed
reuse the same term.
add_pseudonymize(object, ..., lookup = list())
object |
Either a |
... |
variables to be transformed. |
lookup |
a pre-existing name-value pair to define intended psuedonymizations. Instances of 'name' will be replaced with 'value' on transformation.#' |
A 'DeidentList' representing the untrained transformation pipeline. The object contains fields:
deident_methods
a list of each step in the pipeline (consisting of variables
and method
)
and methods:
mutate
apply the pipeline to a new data set
to_yaml
serialize the pipeline to a '.yml' file
# Basic usage;
pipe.pseudonymize <- add_pseudonymize(ShiftsWorked, Employee)
pipe.pseudonymize$mutate(ShiftsWorked)
pipe.pseudonymize2 <- add_pseudonymize(ShiftsWorked, Employee,
lookup=list("Kyle Wilson" = "Kyle"))
pipe.pseudonymize2$mutate(ShiftsWorked)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.