orderPed: Orders a Pedigree

Description Usage Arguments Value Note Author(s) See Also Examples

Description

Orders a pedigree so parents come before offspring

Usage

1
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 kinship2 package

Author(s)

Jarrod Hadfield [email protected]

See Also

MCMCped

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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)

MasterBayes documentation built on July 30, 2017, 1:01 a.m.