View source: R/checkParentAge.R
checkParentAge | R Documentation |
minParentAge
Ensure parents are sufficiently older than offspring
checkParentAge(sb, minParentAge = 2, reportErrors = FALSE)
sb |
A dataframe containing a table of pedigree and demographic information. |
minParentAge |
numeric values to set the minimum age in years for an animal to have an offspring. Defaults to 2 years. The check is not performed for animals with missing birth dates. |
reportErrors |
logical value if TRUE will scan the entire file and make a list of all errors found. The errors will be returned in a list of list where each sublist is a type of error found. |
A dataframe containing rows for each animal where one or more
parent was less than minParentAge
. It contains all of the columns
in the original sb
dataframe with the following added columns:
{sireBirth} {sire's birth date}
{sireAge} {age of sire in years on the date indicated by
birth
.}
{damBirth} {dam's birth date}
damAge
{age of dam in years on the date indicated by birth
.}
library(nprcgenekeepr)
qcPed <- nprcgenekeepr::qcPed
checkParentAge(qcPed, minParentAge = 2)
checkParentAge(qcPed, minParentAge = 3)
checkParentAge(qcPed, minParentAge = 5)
checkParentAge(qcPed, minParentAge = 6)
head(checkParentAge(qcPed, minParentAge = 10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.