Learn R Programming

nadiv (version 2.14.2)

genAssign: Generation assignment

Description

Given a pedigree, the function assigns the generation number to which each individual belongs.

Usage

genAssign(pedigree)

Arguments

pedigree
A pedigree with columns organized: ID, Dam, Sire

Value

  • A vector of values is returned. This vector is in the same order as the ID column of the pedigree.

Details

0 is the base population.

Migrants, or any individuals where both parens are unknown, are assigned to generation zero. If parents of an individual are from two different generations (e.g., mom = 0 and dad = 1), the individual is assigned to the generation following the greater of the two parents (e.g., 2 in this example).