R/hasBothParents.R
hasBothParents.Rd
hasBothParents checks to see if both parents are identified.
hasBothParents(id, ped)
id | character vector of IDs to examine for parents |
---|---|
ped | a pedigree |
TRUE if ID has both sire and dam identified in ped
.
# \donttest{ library(nprcgenekeepr) ped <- nprcgenekeepr::pedOne names(ped) <- c("id", "sire", "dam", "sex", "birth") hasBothParents("o2", ped)#> [1] TRUEped$sire[ped$id == "o2"] <- NA hasBothParents("o2", ped)#> [1] FALSE# }