getFounders: Get the founder ids from a pedigree

View source: R/getFounders.R

getFoundersR Documentation

Get the founder ids from a pedigree

Description

Part of Pedigree Curation

Usage

getFounders(ped)

Arguments

ped

datatable that is the Pedigree. It contains pedigree information. The fields id, sire and dam are required.

Details

A founder is an animal whose sire and dam are both unknown (NA). Animals with exactly one known parent (partial parentage) are not founders.

Value

A vector of the id values of the founders, in pedigree order. It has the same type as ped$id and is empty when there are no founders.

See Also

isFounder for the founder logical mask.

Examples

library(nprcgenekeepr)
ped <- data.frame(
  id = c("A", "B", "C", "D", "E", "F", "G"),
  sire = c(NA, NA, "A", "A", NA, "D", "D"),
  dam = c(NA, NA, "B", "B", NA, "E", "E"),
  stringsAsFactors = FALSE
)
getFounders(ped)

nprcgenekeepr documentation built on July 26, 2026, 5:06 p.m.