deident: Define a transformation pipeline

View source: R/deident.R

deidentR 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 of variables and method)

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)
  

deident documentation built on April 3, 2025, 6:14 p.m.