powered by
This is not robust as it fails if all IDs are found not within map.
map
mapIdsToObfuscated(ids, map)
A character vector with original IDs replaced by their obfuscated counterparts.
character vector with original IDs
named character vector where the values are the obfuscated IDs and the vector of names (names(map)) is the vector of original names.
names(map)
Other obfuscation: obfuscateDate(), obfuscateId(), obfuscatePed()
obfuscateDate()
obfuscateId()
obfuscatePed()
set_seed(1) ped <- qcStudbook(nprcgenekeepr::pedSix) obfuscated <- obfuscatePed(ped, map = TRUE) someIds <- c("s1", "s2", "d1", "d1") mapIdsToObfuscated(someIds, obfuscated$map)
Run the code above in your browser using DataLab