primary_ancestor_pairs: Return a list of the indices of the primary shared ancestors

Description Usage Arguments Value Examples

View source: R/RcppExports.R

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

1

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

1
2
# find primary ancestor pairs of example AMMs
lapply(example_amms, primary_ancestor_pairs)

CKMRpop documentation built on July 17, 2021, 5:07 p.m.