Learn R Programming

nprcgenekeepr (version 2.0.0)

isFounder: Identify the founders in a pedigree

Description

Part of Pedigree Curation

Usage

isFounder(ped)

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.

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.

See Also

getFounders for the founder id values.

Examples

Run this code
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)

Run the code above in your browser using DataLab