Learn R Programming

nprcgenekeepr (version 1.0.5)

getOffspring: Get offspring to corresponding animal IDs provided

Description

Get offspring to corresponding animal IDs provided

Usage

getOffspring(pedSourceDf, ids)

Arguments

pedSourceDf

dataframe with pedigree structure having at least the columns id, sire, and dam.

ids

character vector of animal IDs

Value

A character vector containing all of the ancestor IDs for all of the IDs provided in the second argument ids. All ancestors are combined and duplicates are removed.

Examples

Run this code
# NOT RUN {
library(nprcgenekeepr)
# }
# NOT RUN {
pedOne <- nprcgenekeepr::pedOne
names(pedOne) <- c("id", "sire", "dam", "sex", "birth")
getOffspring(pedOne, c("s1", "d2"))
# }

Run the code above in your browser using DataLab