markPotentialChildren {BGmisc}R Documentation

Mark and Assign children

Description

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)

Arguments

df_Ngen

A data frame for the current generation being processed. It must include columns for individual IDs ('id'), spouse IDs ('spt'), 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.

Value

Modifies 'df_Ngen' in place by updating or adding columns related to individual roles ('ifparent', 'ifson', 'ifdau') and couple IDs ('coupleId'). The updated data frame is also returned for integration into the larger pedigree data frame ('df_Fam').


[Package BGmisc version 1.2.0 Index]