inst/doc/reusing_methods.R

## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## ----setup--------------------------------------------------------------------
library(deident)

psu <- Pseudonymizer$new()

name_pipe <- starwars |>
  deident(psu, name)

apply_deident(starwars, name_pipe)

## -----------------------------------------------------------------------------
combined.frm <- data.frame(
  ID = c(head(starwars$name, 5), head(ShiftsWorked$Employee, 5))
)

reused_pipe <- combined.frm |>
  deident(psu, ID)

apply_deident(combined.frm, reused_pipe)

Try the deident package in your browser

Any scripts or data that you put into this service are public.

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