powered by
Orders a pedigree so parents come before offspring
orderPed(ped, time_born=NULL)
pedigree with id, dam and sire in ech column
an optional vector of birth dates by which the pedigree can be ordered)
an ordered pedigree pedigree with id, dam and sire in each column
MCMCped
# 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) # }
Run the code above in your browser using DataLab