Learn R Programming

AlphaSimR (version 1.6.0)

getPed: Get pedigree

Description

Returns the population's pedigree as stored in the id, mother and father slots. NULL is returned if the input population lacks the required.

Usage

getPed(pop)

Arguments

pop

a population

Examples

Run this code
# Create a founder population
founderPop = quickHaplo(2,1,2)

# Set simulation parameters
SP = SimParam$new(founderPop)

# Create a population
pop = newPop(founderPop, simParam=SP)

# Get the pedigree
getPed(pop)

# Returns NULL when a population lacks a pedigree
getPed(founderPop)

Run the code above in your browser using DataLab