generatePedigree {GeneticsPed}R Documentation

Generate Pedigree example

Description

generatePedigree creates nonoverlapping pedigree example, which can be used for demos and code testing.

Usage

generatePedigree(nId, nGeneration=3, nFather=round(nId/3),
  nMother=nId - nFather, start=1, generationOrder="increasing",
  colClass="integer")

Arguments

nId integer, number of individuals per generation, at least 2
nGeneration integer, number of generations
nFather integer, number of fathers per generation
nMother integer, number of mothers per generation
start first generation value
generationOrder character, generation value is "increasing" or "decreasing" through generations
colClass character, class for columns: "integer" or "factor"

Value

An extended, sorted and possibly coded pedigree object with following columns: id, father, mother, generation and sex.

Author(s)

Marcos Rico Gutierrez (author of MATLAB code) and Gregor Gorjanc (R implementation)

References

Rico Gutierrez, M. (1999) Los modelos lineales en la mejora genetica animal. Ediciones Peninsular. ISBN 84-605-9910-8.

See Also

Pedigree

Examples

  generatePedigree(5)
  generatePedigree(nId=5, nGeneration=4, nFather=1, nMother=2)
  generatePedigree(nId=5, nGeneration=4, nFather=1, nMother=2,
                   start=0, generationOrder="decreasing")
  generatePedigree(nId=100, nGeneration=20, nFather=10, nMother=50)

[Package GeneticsPed version 1.4.0 Index]