get_ancestors.RdThis helper function recursively identifies all ancestors (parents, grandparents, etc.) of a given individual in the pedigree.
get_ancestors(id, ped)An integer vector containing the IDs of all ancestors of the individual. Returns an empty integer vector if the individual has no ancestors or is not found in the pedigree.