orderPed: Orders a pedigree

View source: R/drivers.r

orderPedR Documentation

Orders a pedigree

Description

Orders a pedigree so that offspring follow parents.

Usage

orderPed(ped)

Arguments

ped

data.frame with three columns: id,id parent1,id parent2

Value

numerical vector

Examples

id <- 1:6
dam <- c(0,0,1,1,4,4)
sire <- c(0,0,2,2,3,5)
pedigree <- data.frame(id,dam,sire)
(ord <- orderPed(pedigree))
pedigree <- pedigree[6:1,]
(ord <- orderPed(pedigree))
pedigree <- pedigree[order(ord),]
pwrong <- pedigree
pwrong[1,2] <- pwrong[6,1]

pedigree documentation built on Aug. 14, 2022, 1:06 a.m.