buildWithinGenerations {BGmisc} | R Documentation |
Process Generations for Pedigree Simulation
Description
This function iterates through generations in a pedigree simulation, assigning IDs, creating data frames, determining sexes, and managing pairing within each generation.
Usage
buildWithinGenerations(sizeGens, marR, sexR, Ngen)
Arguments
sizeGens |
A numeric vector containing the sizes of each generation within the pedigree. |
marR |
Mating rate. A numeric value ranging from 0 to 1 which determines the proportion of mated (fertilized) couples in the pedigree within each generation. For instance, marR = 0.5 suggests 50 percent of the offspring in a specific generation will be mated and have their offspring. |
sexR |
Sex ratio of offspring. A numeric value ranging from 0 to 1 that determines the proportion of males in all offspring in this pedigree. For instance, 0.4 means 40 percent of the offspring will be male. |
Ngen |
Number of generations. An integer >= 2 that determines how many generations the simulated pedigree will have. The first generation is always a fertilized couple. The last generation has no mated individuals. |
Value
A data frame representing the simulated pedigree, including columns for family ID ('fam'),