Part of Pedigree Curation
Value
A vector of factors representing standardized sex codes after transformation from non-standard codes.
Details
Standard sex codes are
F– replacing "FEMALE" or "2"M– replacing "MALE" or "1"H– replacing "HERMAPHRODITE" or "4", ifignoreHerm== FALSEU– replacing "HERMAPHRODITE" or "4", ifignoreHerm== TRUEU– replacing "UNKNOWN" or "3"
Examples
library(nprcgenekeepr)
original <- c(
"m", "male", "1", "MALE", "M", "F", "f", "female",
"FemAle", "U", "Unknown", "H", "hermaphrodite",
"U", "Unknown", "3", "4"
)
sexCodes <- convertSexCodes(original)
sexCodes
#> [1] M M M M M F F F F U U U U U U U U
#> Levels: F M H U
