View source: R/hasBothParents.R
| hasBothParents | R Documentation |
Check whether an animal has both parents
hasBothParents(id, ped)
id |
character vector of IDs to examine for parents |
ped |
The pedigree information in data.frame format |
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.