orderPed {MasterBayes}R Documentation

Orders a Pedigree

Description

Orders a pedigree so parents come before offspring

Usage

orderPed(ped, time_born=NULL)

Arguments

ped pedigree with id, dam and sire in ech column
time_born an optional vector of birth dates by which the pedigree can be ordered)

Value

an ordered pedigree pedigree with id, dam and sire in each column

Note

This function has changed name from order.ped in earler versions <2.42. order.ped did not always (rarely) ordered the pedigree correctly. This new function uses the kindepth function from the kinship package

Author(s)

Jarrod Hadfield j.hadfield@ed.ac.uk

See Also

MCMCped

Examples

## Not run: 
pedigree<-matrix(NA, 8,3)
pedigree[,1]<-1:8
pedigree[,2][5:8]<-c(1,1,2,2)
pedigree[,3][5:8]<-c(3,3,4,4)

pedigree<-pedigree[sample(1:8),]

pedigree2<-orderPed(pedigree)
## End(Not run)

[Package MasterBayes version 2.45 Index]