fam_ancestors {simfam}R Documentation

Construct an ancestors-only pedigree for one person G-generations deep

Description

Creates an idealized pedigree listing all ancestors of one individual starting from G generations ago, without inbreeding (a binary tree). IDs are automatically generated strings indicating generation and individual number within generation. Useful for simple simulations of individuals with explicit ancestors.

Usage

fam_ancestors(G)

Arguments

G

The desired number of generations. G=1 returns a trivial pedigree with a single individual; G=2 an individual and its two parents; G=3 an individual, its parents and grandparents, etc.

Value

A list with two named elements:

See Also

sim_pedigree() to simulate a random pedigree with a given number of generations, generation sizes, and other parameters.

Examples

# construct the 8-generation ancestor tree of one individual:
data <- fam_ancestors( 8 )
# this is the pedigree
fam <- data$fam
# and this is the handy list of IDs by discrete generation,
# used by `*_last_gen` functions to reduce memory usage
ids <- data$ids


[Package simfam version 1.1.6 Index]