primary_ancestor_pairs {CKMRpop} | R Documentation |
Return a list of the indices of the primary shared ancestors
Description
This operates on an ancestry match matrix and uses a simple, divide-by_two relationship between an ancestor and its descendants in the ordering of an ancestry vector to determine which of the matching ancestors are secondary, and then return the ones that are primary.
Usage
primary_ancestor_pairs(M)
Arguments
M |
an ancestry match matrix (it is a logical matrix) |
Value
A list of pairs. Each pair is the 1-based index of ancestor of ind_1, then ind_2 of the primary shared ancestors.
Examples
# find primary ancestor pairs of example AMMs
lapply(example_amms, primary_ancestor_pairs)
[Package CKMRpop version 0.1.3 Index]