seg2tib: Takes a gamete in segment format and returns a tibble with...

View source: R/seg2tib.R

seg2tibR Documentation

Takes a gamete in segment format and returns a tibble with Pop and indiv_index

Description

A small helper function.

Usage

seg2tib(s)

Arguments

s

a gamete in segment format

Value

Returns a tibble with columns tmp_seg_names, start, and end, that show the origin (in tmp_seg_names) of segments that start at start and end at end.

Examples

# first make a segment that has pieces from a few different founders
 V <- c(Amy = 0, Bob = 10000, Joe = 30000, Frieda = 40000)
 seg2tib(V)

eriqande/gscramble documentation built on March 5, 2024, 4:22 p.m.