sortped: Sort a pedigree

View source: R/sortped.R

sortpedR Documentation

Sort a pedigree

Description

sortped function assigns generations and sorts a pedigree .

Usage

sortped(ped, addgen = TRUE)

Arguments

ped

A data.table or data frame including the pedigree, in which the names of the first three columns are Ind, Sire and Dam. Missing parent has been replaced with the default missing value NA.

addgen

A logical value indicates whether the individual generation number will be inferred. The default values is TRUE, then a new column named Gen will be added in the returned data.table.

Details

This function takes a pedigree, assigns individuals to different generations, sort parents before offspring.

Value

A data.table including the resorted pedigree is returned. The individual generation is inferred and a new column Gen is added when the parameter addgen is TRUE. The Gen column is integer.


luansheng/visPedigree documentation built on Feb. 4, 2023, 11:10 p.m.