genAssign {nadiv} | R Documentation |
Given a pedigree, the function assigns the generation number to which each individual belongs.
genAssign(pedigree, ...) ## Default S3 method: genAssign(pedigree, ...) ## S3 method for class 'numPed' genAssign(pedigree, ...)
pedigree |
A pedigree where the columns are ordered ID, Dam, Sire |
... |
Arguments to be passed to methods |
0 is the base population.
Migrants, or any individuals where both parents are unknown, are assigned to generation zero. If parents of an individual are from two different generations (e.g., dam = 0 and sire = 1), the individual is assigned to the generation following the greater of the two parents (e.g., 2 in this example).
A vector of values is returned. This vector is in the same order as the ID column of the pedigree.