getGen: Calculates generations for each animal in the pedigree

Description Usage Arguments Details Value Examples

Description

Calculates generations for each animal in the pedigree

Usage

1
getGen(pedigree)

Arguments

pedigree

data.frame with three columns: id, sire and dam

Details

Uses Rcpp package for calculations

Value

Integer vector

Examples

1
2
3
4
5
id = c(1,2,3,4,5,6,7,8,9,10)
sire = c(0,0,1,1,3,5,5,5,7,7)
dam = c(0,0,2,2,2,4,4,6,6,8)
ped = as.data.frame(cbind(id,sire,dam))
ped$Gen = getGen(ped)

BrnCPrz/PedyR documentation built on May 6, 2019, 8:47 a.m.