Description Usage Arguments Details Value Examples
View source: R/convertSexCodes.R
Part of Pedigree Curation
1 | convertSexCodes(sex, ignoreHerm = TRUE)
|
sex |
factor with levels: "M", "F", "U". Sex specifier for an individual. |
ignoreHerm |
logical flag indicating if hermaphrodites should be
treated as unknown sex ("U"), default is |
Standard sex codes are
F – replacing "FEMALE" or "2"
M – replacing "MALE" or "1"
H – replacing "HERMAPHRODITE" or "4", if ignore.herm == FALSE
U – replacing "HERMAPHRODITE" or "4", if ignore.herm == TRUE
U – replacing "UNKNOWN" or "3"
A vector of factors representing standardized sex codes after transformation from non-standard codes.
1 2 3 4 5 6 | 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.