deident {deident} | R Documentation |
Define a transformation pipeline
Description
deident()
creates a transformation pipeline of 'deidentifiers' for
the repeated application of anonymization transformations.
Usage
deident(data, deidentifier, ...)
Arguments
data |
A data frame, existing pipeline, or a 'deidentifier' (as either initialized object, class generator, or character string) |
deidentifier |
A deidentifier' (as either initialized object, class generator, or character string) to be appended to the current pipeline |
... |
Positional arguments are variables of 'data' to be transformed and key-word arguments are passed to 'deidentifier' at creation |
Value
A 'DeidentList' representing the untrained transformation pipeline. The object contains fields:
-
deident_methods
a list of each step in the pipeline (consisting ofvariables
andmethod
)
and methods:
-
mutate
apply the pipeline to a new data set -
to_yaml
serialize the pipeline to a '.yml' file
Examples
#
pipe <- deident(ShiftsWorked, Pseudonymizer, Employee)
print(pipe)
apply_deident(ShiftsWorked, pipe)