removePotentialSires: Removes potential sires from list of Ids

View source: R/removePotentialSires.R

removePotentialSiresR Documentation

Removes potential sires from list of Ids

Description

Removes potential sires from list of Ids

Usage

removePotentialSires(ids, minAge, ped)

Arguments

ids

character vector of IDs of the animals

minAge

integer value indicating the minimum age to consider in group formation. Pairwise kinships involving an animal of this age or younger will be ignored. Default is 1 year.

ped

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

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, minAge = 2, ped = pedWithGenotype)
pedWithGenotype[pedWithGenotype$id %in% noSires, c("sex", "age")]
pedWithGenotype[pedWithGenotype$id %in% sires, c("sex", "age")]

rmsharp/nprcmanager documentation built on Feb. 2, 2025, 12:45 a.m.