ped2kinpair: Pedigree to pairwise kinship

View source: R/ped.R

ped2kinpairR Documentation

Pedigree to pairwise kinship

Description

Converts a pedigree class object from fam2ped to a pairwise list of relationships and their expected/theoretical kinship coefficient.

Usage

ped2kinpair(ped)

Arguments

ped

A "pedigree" class object from fam2ped.

Value

A tibble containing all pairwise kinship coefficients from the input pedigree.

Examples

famfile <- system.file("extdata", "3gens.fam", package="skater", mustWork=TRUE)
famfile %>%
  read_fam() %>%
  fam2ped() %>%
  dplyr::mutate(kinpairs=purrr::map(ped, ped2kinpair)) %>%
  dplyr::select(fid, kinpairs) %>%
  tidyr::unnest(cols=kinpairs)

signaturescience/skater documentation built on Feb. 11, 2023, 4:19 p.m.