R/convertStatusCodes.R
convertStatusCodes.Rd
Part of Pedigree Curation
convertStatusCodes(status)
status | character vector or NA. Flag indicating an individual's status as alive, dead, sold, etc. |
---|
A factor vector of the standardized status codes with levels: `ALIVE`, `DECEASED`, `SHIPPED`, and `UNKNOWN`.
# \donttest{ library(nprcgenekeepr) original <- c("A", "alive", "Alive", "1", "S", "Sale", "sold", "shipped", "D", "d", "dead", "died", "deceased", "2", "shiped", "3", "U", "4", "unknown", NA, "Unknown", "H", "hermaphrodite", "U", "Unknown", "4") convertStatusCodes(original)#> [1] ALIVE ALIVE ALIVE ALIVE SHIPPED SHIPPED SHIPPED SHIPPED #> [9] DECEASED DECEASED DECEASED DECEASED DECEASED DECEASED SHIPPED SHIPPED #> [17] UNKNOWN UNKNOWN UNKNOWN UNKNOWN UNKNOWN <NA> <NA> UNKNOWN #> [25] UNKNOWN UNKNOWN #> Levels: ALIVE DECEASED SHIPPED UNKNOWN# }