synbreed (version 0.12-6)

simul.pedigree:

Description

This function can be used to simulate a pedigree for a given number of generations and individuals. Function assumes random mating within generations. Inbred individuals may be generated by chance.

Usage

simul.pedigree(generations = 2, ids = 4, animals=FALSE,familySize=1)

Arguments

generations
integer. Number of generations to simulate
ids
integer or vector of integers. Number of genotypes in each generation. If length equal one, the same number will be replicated and used for each generation.
animals
logical. Should a pedigree for animals be simulated (no inbreeding)? See 'Details'.
familySize
numeric. Number of individuals in each full-sib family in the last generation.

Value

An object of class pedigree with N=sum(ids) genotypes.

Details

If animals=FALSE, the parents for the current generation will be randomly chosen out of the genotypes in the last generation. If Par1 = Par2, an inbreed is generated. If animal=TRUE, each ID is either sire or dam. Each ID is progeny of one sire and one dam.

See Also

simul.phenotype, create.pedigree, plot.pedigree

Examples

Run this code
# example for plants
ped <- simul.pedigree(gener=4,ids=c(3,5,8,8))
plot(ped)
#example for animals
peda <- simul.pedigree(gener=4,ids=c(3,5,8,8),animals=TRUE)
plot(peda)

Run the code above in your browser using DataLab