Learn R Programming

nadiv (version 2.18.0)

simPedHS: Half-sib pedigree construction

Description

Simulates a pedigree for a half-sib mating design (sometimes also called the North Carolina Design 1).

Usage

simPedHS(s, d, n, uniqueDname = TRUE, prefix = NULL)

Value

A data.frame with columns corresponding to: id, dam, sire, and sex. Sex is "M" for males and "F" for females.

Arguments

s

Number of sires

d

Number of dams per sire

n

Number of offspring per mating (must be > or = 2)

uniqueDname

Logical indicating if dams should have unique names within sire families or throughout the entire pedigree

prefix

Optional prefix to add to every identity

Details

n must be greater than or equal to 2, because one male and one female offspring are produced from each mating

Some functions/calculations get bogged down if no two dams have the same ID in the entire pedigree (e.g., aov). However, other functions must have unique identifiers for every individual.

See Also

simPedDFC

Examples

Run this code

  simPedHS(s = 1, d = 3, n = 2)

Run the code above in your browser using DataLab