Learn R Programming

nprcgenekeepr (version 3.0.0)

mapIdsToObfuscated: Map IDs to Obfuscated IDs

Description

This is not robust: it stops with an error if any ID in ids is not one of the names of map.

Usage

mapIdsToObfuscated(ids, map)

Value

A character vector with original IDs replaced by their obfuscated counterparts.

Arguments

ids

character vector with original IDs

map

named character vector where the values are the obfuscated IDs and the vector of names (names(map)) is the vector of original names.

See Also

Other obfuscation: obfuscateDate(), obfuscateGenomicROH(), obfuscateGenotypeMatrix(), obfuscateId(), obfuscateLdBlocks(), obfuscateMhcHaplotypes(), obfuscatePed(), obfuscateTwinRelations()

Examples

Run this code
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