Recursive function that computes steps for sorting algorithm described by Zhang et al (2009).
sort_step(p, id, dam, sire, t, S, G, t_G)
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
Pedigree to sort (used as template)
A string naming the column with individual identities. It will be renamed to its default value 'id'.
A string naming the column with maternal identities. It will be renamed to its default value 'dam'.
A string naming the column with paternal identities. It will be renamed to its default value 'sire'.
Template for the new sorted pedigree
Vector of assumed parent individuals
Vector of generation numbers (0 identifies the youngest)
Vector G for the new sorted pedigree
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.
ped_sort