inbreeding {pedigreeTools} | R Documentation |
Create the inbreeding coefficients according to the algorithm given in "Comparison of four direct algorithms for computing inbreeding coefficients" by Mehdi Sargolzaei and Hiroaki Iwaisaki, Animal Science Journal (2005) 76, 401–406.
inbreeding(ped)
ped |
the inbreeding coefficients as a numeric vector
ped <- pedigree(sire = c(NA, NA, 1, 1, 4, 5),
dam = c(NA, NA, 2, NA, 3, 2),
label = 1:6)
(F <- inbreeding(ped))
# Test for correctness
FExp <- c(0.000, 0.000, 0.000, 0.000, 0.125, 0.125)
stopifnot(!any(abs(F - FExp) > .Machine$double.eps))