check_pedigree {simcross} | R Documentation |
Check a pedigree for errors
Description
Perform a series of checks on the tabular data for a pedigree, checking for problems
Usage
check_pedigree(pedigree, ignore_sex = FALSE)
Arguments
pedigree |
Numeric matrix or data frame with four columns: ID,
mom ID, dad ID, sex. Sex is coded as |
ignore_sex |
If TRUE, ignore the sex values completely (appropriate for hermaphroditic species.) |
Details
The parents should be listed before any of their
offspring. Founders should have 0's for mother and father; all
others should have non-zero values for the parents, and the parents
should appear in the pedigree. Father should be male and mothers
should be female (unless ignore_sex=TRUE
). Individual
identifiers should be unique and non-zero. There should be no
missing values anywhere. (NA
s are allowed in the sex column
if ignore_sex=TRUE
.)
Value
TRUE (invisibly) if everything is okay; otherwise gives an error.
See Also
sim_from_pedigree()
,
sim_ril_pedigree()
Examples
tab <- sim_ril_pedigree(7)
check_pedigree(tab)