build_pedigrees: Build pedigrees from (individuals in) a population.

Description Usage Arguments Value See Also Examples

View source: R/RcppExports.R

Description

In a newly simulated population, each individual only knows its father and children. Using this information, this function builds pedigrees. This makes it easier to e.g. population haplotypes, find path between two individuals (if they are not in the same pedigree, they are not connected).

Usage

1
build_pedigrees(population, progress = TRUE)

Arguments

population

Population generated by sample_geneology() or sample_geneology_varying_size().

progress

Show progress.

Value

An object with class malan_pedigreelist (an internal list of external pointers to pedigrees).

See Also

sample_geneology() and sample_geneology_varying_size() for simulating populations.

Examples

1
2
3
4
5
sim <- sample_geneology(100, 10)
str(sim, 1)
sim$population
peds <- build_pedigrees(sim$population)
peds

malan documentation built on July 2, 2020, 3:01 a.m.