Learn R Programming

nprcgenekeepr (version 1.0.5)

hasBothParents: hasBothParents checks to see if both parents are identified.

Description

hasBothParents checks to see if both parents are identified.

Usage

hasBothParents(id, ped)

Arguments

id

character vector of IDs to examine for parents

ped

a pedigree

Value

TRUE if ID has both sire and dam identified in ped.

Examples

Run this code
# NOT RUN {
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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab