View source: R/hasBothParents.R
hasBothParents | R Documentation |
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
.
library(nprcgenekeepr)
ped <- nprcgenekeepr::pedOne
names(ped) <- c("id", "sire", "dam", "sex", "birth")
hasBothParents("o2", ped)
ped$sire[ped$id == "o2"] <- NA
hasBothParents("o2", ped)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.