This subfunction marks individuals in a generation as potential sons, daughters, or parents based on their relationships and assigns unique couple IDs. It processes the assignment of roles and relationships within and between generations in a pedigree simulation.
Usage
markPotentialChildren(
df_Ngen,
i,
Ngen,
sizeGens,
CoupleF,
code_male = "M",
code_female = "F"
)
Arguments
- df_Ngen
A data frame for the current generation being processed. It must include columns for individual IDs (`id`), spouse IDs (`spID`), sex (`sex`), and any previously assigned roles (`ifparent`, `ifson`, `ifdau`).
- i
Integer, the index of the current generation being processed.
- Ngen
Integer, the total number of generations in the simulation.
- sizeGens
Numeric vector, containing the size (number of individuals) of each generation.
- CoupleF
Integer, IT MIGHT BE the number of couples in the current generation.
- code_male
The value to use for males. Default is "M"
- code_female
The value to use for females. Default is "F"