## Example from chapter 2 of Mrode (2005)
ped <- pedigree(sire = c(NA,NA,1, 1,4,5),
dam = c(NA,NA,2,NA,3,2), label= 1:6)
(fac <- relfactor(ped))
crossprod(fac) # the relationship matrix
getA(ped) # the relationship matrix
Run the code above in your browser using DataLab