View source: R/setPopulation.R
setPopulation | R Documentation |
Part of the pedigree filtering toolset.
setPopulation(ped, ids)
ped |
datatable that is the |
ids |
character vector of IDs to be flagged as part of the population under consideration. |
An updated pedigree with the population
column added or
updated by being set to TRUE
for the animal IDs in ped$id
and
FALSE
otherwise.
examplePedigree <- nprcgenekeepr::examplePedigree
breederPed <- qcStudbook(examplePedigree, minParentAge = 2,
reportChanges = FALSE,
reportErrors = FALSE)
focalAnimals <- breederPed$id[!(is.na(breederPed$sire) &
is.na(breederPed$dam)) &
is.na(breederPed$exit)]
breederPed <- setPopulation(ped = breederPed, ids = focalAnimals)
nrow(breederPed[breederPed$population, ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.