checkParentIDs | R Documentation |
This function takes a pedigree object and performs two main tasks: 1. Checks for the validity of parent IDs, specifically looking for instances where only one parent ID is missing. 2. Optionally repairs the missing parent IDs based on a specified logic.
checkParentIDs(
ped,
verbose = FALSE,
repair = FALSE,
repairsex = repair,
addphantoms = repair,
parentswithoutrow = repair
)
ped |
A dataframe representing the pedigree data with columns 'ID', 'dadID', and 'momID'. |
verbose |
A logical flag indicating whether to print progress and validation messages to the console. |
repair |
A logical flag indicating whether to attempt repairs on missing parent IDs. |
repairsex |
A logical flag indicating whether to attempt repairs on sex of the parents |
addphantoms |
A logical flag indicating whether to add phantom parents for missing parent IDs. |
parentswithoutrow |
A logical flag indicating whether to add parents without a row in the pedigree. |
Depending on the value of 'repair', either a list containing validation results or a repaired dataframe is returned.
## Not run:
ped <- data.frame(ID = 1:4, dadID = c(NA, 1, 1, 2), momID = c(NA, NA, 2, 2))
checkParentIDs(ped, verbose = TRUE, repair = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.