genAssign: Generation assignment

View source: R/genAssign.R

genAssignR Documentation

Generation assignment

Description

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

Usage

genAssign(pedigree, ...)

## Default S3 method:
genAssign(pedigree, ...)

## S3 method for class 'numPed'
genAssign(pedigree, ...)

Arguments

pedigree

A pedigree where the columns are ordered ID, Dam, Sire

...

Arguments to be passed to methods

Details

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).

Value

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

Author(s)

matthewwolak@gmail.com


nadiv documentation built on May 29, 2024, 10:40 a.m.