breed: Simulate the progeny

Description Usage Arguments Value Examples

Description

Simulates the progeny for a given breeding pair, to a specified litter size

Usage

1
breed(pair, litter)

Arguments

pair

A vector of alleles, of length 2. Alleles must be represented as 0, 1 or 2.

litter

The litter size from the breeding pair.

Value

The alleles of progeny, also using the 0, 1 or 2 representation

Examples

1
2
3
4
5
breed(c(1, 1), litter = 6)

# Sampling a population
pop <-matrix(sample(c(0, 1, 2), 10, TRUE), ncol = 2)
progeny <- apply(pop, 1, breed, litter = 6)

steveped/driftSim documentation built on May 30, 2019, 5:38 p.m.