This is an internal helper function for pedigree alignment. It processes a single subject (founder or not) along with their spouse(s), building up the alignment structure. This function is called recursively by kinship2_align.pedigree to construct the entire pedigree layout.
kinship2_alignped1(x, dad, mom, level, horder, packed, spouselist)A list containing:
Matrix of subject IDs at each level and position
Matrix of horizontal positions
Matrix of family indices
Vector of counts per level
Updated spouse list
Integer vector of subject ID(s) to process
Integer vector of father indices
Integer vector of mother indices
Integer vector indicating the generation level of each subject
Numeric vector of hint order for positioning subjects
Logical, if TRUE uses compact packing algorithm
Matrix defining spouse relationships