isFounder: Identify the founders in a pedigree

View source: R/isFounder.R

isFounderR Documentation

Identify the founders in a pedigree

Description

Part of Pedigree Curation

Usage

isFounder(ped)

Arguments

ped

a pedigree data.frame with (at least) the columns sire and dam.

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 logical vector with one element per row of ped that is TRUE for each animal whose sire and dam are both NA. The result never contains NA.

See Also

getFounders for the founder id values.

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
)
isFounder(ped)

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