Learn R Programming

skater (version 0.1.2)

ped2kinpair: 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)

Value

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

Arguments

ped

A "pedigree" class object from fam2ped.

Examples

Run this code
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)

Run the code above in your browser using DataLab