Check whether an animal has both parents
Value
TRUE if ID has both sire and dam identified in ped, FALSE
if one or both are unknown, and logical(0) if id is not in
ped.
Examples
library(nprcgenekeepr)
ped <- nprcgenekeepr::pedOne
names(ped) <- c("id", "sire", "dam", "sex", "birth")
hasBothParents("o2", ped)
#> [1] TRUE
ped$sire[ped$id == "o2"] <- NA
hasBothParents("o2", ped)
#> [1] FALSE
