Learn R Programming

purgeR (version 1.8.2)

ped_sort_i: Sorting steps

Description

Recursive function that computes steps for sorting algorithm described by Zhang et al (2009).

Usage

sort_step(p, id, dam, sire, t, S, G, t_G)

Value

No return value. Will print an error message if checking fail.

Filled template for the sorted pedigree. Once recursion ends, it returns the sorted pedigree

Arguments

p

Pedigree to sort (used as template)

id

A string naming the column with individual identities. It will be renamed to its default value 'id'.

dam

A string naming the column with maternal identities. It will be renamed to its default value 'dam'.

sire

A string naming the column with paternal identities. It will be renamed to its default value 'sire'.

t

Template for the new sorted pedigree

S

Vector of assumed parent individuals

G

Vector of generation numbers (0 identifies the youngest)

t_G

Vector G for the new sorted pedigree

References

  • Zhang Z, Li C, Todhunter RJ, Lust G, Goonewardene L, Wang Z. 2009. An algorithm to sort complex pedigrees chronologically without birthdates. J Anim Vet Adv. 8 (1): 177-182.

See Also

ped_sort