View source: R/kinship2_internals.R
| kinship2_kindepth | R Documentation |
This function computes the depth of each subject in a pedigree, defined as the maximal number of generations of ancestors (distance to the farthest founder). Optionally aligns spouses to plot on the same generation level.
kinship2_kindepth(id, dad.id, mom.id, align = FALSE)
id |
Either a pedigree/pedigreeList object, or a vector of subject IDs |
dad.id |
Vector of father IDs (required if 'id' is not a pedigree object) |
mom.id |
Vector of mother IDs (required if 'id' is not a pedigree object) |
align |
Logical, if TRUE attempts to align married couples at the same depth level for better visualization (default FALSE) |
When 'align=TRUE', the function adjusts depths so that married couples appear on the same generation level when possible. This produces more aesthetically pleasing pedigree plots. The alignment algorithm handles marry-ins, multiple marriages, and inbreeding loops.
Integer vector of depth values for each subject, where 0 = founder, 1 = child of founder, etc.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.