Learn R Programming

GeneticsPed (version 1.34.0)

generatePedigree: 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.

References

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

See Also

Pedigree

Examples

Run this code
  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)

Run the code above in your browser using DataLab