boothresearch / action-inaction

Replication package for Booth new RP workshop in R
0 stars 16 forks source link

Package to anonymize IDs #12

Open luizaandrade opened 1 month ago

luizaandrade commented 1 month ago

The anonymizer package seems to be a good resource for this. I have never used it, though, so you should do some more research if you want to use it.

luizaandrade commented 1 month ago

Actually, that is no longer in CRAN. Here's some code:

library(uuid)
library(tidyverse)

data <-
  data.frame(
    name = c("luiza", "luiza", "raghu", "rosanna")
  ) %>%
  mutate(
    uuid = UUIDfromName(
      namespace = "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
      name = name
    )
  )