Skip to contents

Get parents to corresponding animal IDs provided

Usage

getParents(pedSourceDf, ids)

Arguments

pedSourceDf

dataframe with pedigree structure having at least the columns id, sire, and dam. The pedigree is the first argument, unlike getProbandPedigree(), getDescendantPedigree(), getPedDirectRelatives() and findOffspring(), which take the animal ids first.

ids

character vector of animal IDs

Value

A character vector with the IDs of the parents of the provided ID list.

Examples

library(nprcgenekeepr)
pedOne <- nprcgenekeepr::pedOne
names(pedOne) <- c("id", "sire", "dam", "sex", "birth")
getParents(pedOne, c("o1", "d4"))
#> [1] "s1" "d1"