removePotentialSires: Remove potential sires from a list of IDs

View source: R/removePotentialSires.R

removePotentialSiresR Documentation

Remove potential sires from a list of IDs

Description

Remove potential sires from a list of IDs

Usage

removePotentialSires(ids, minAge, ped)

Arguments

ids

character vector of animal IDs

minAge

integer value giving the inclusive minimum current age (in years) a male must have to be listed as a potential sire. Default is 1 year.

ped

dataframe that is the Pedigree. It contains pedigree information including the IDs listed in ids.

Value

character vector of Ids with any potential sire Ids removed.

Examples

library(nprcgenekeepr)
qcBreeders <- nprcgenekeepr::qcBreeders
pedWithGenotype <- nprcgenekeepr::pedWithGenotype
noSires <- removePotentialSires(
  ids = qcBreeders, minAge = 2,
  ped = pedWithGenotype
)
sires <- getPotentialSires(qcBreeders, ped = pedWithGenotype, minAge = 2)
pedWithGenotype[pedWithGenotype$id %in% noSires, c("sex", "age")]
pedWithGenotype[pedWithGenotype$id %in% sires, c("sex", "age")]

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