mating: Mating function

View source: R/glads_funcs.R

matingR Documentation

Mating function


A function to select the mating pairs


mating(z, G)



A data.frame with the sex and fitness value of each individual in the population.


An object of class "struct" with the genetic structure of each individual in the population.


The function is used internally in the function newborns() in order to select the mating pairs. This function returns a three-dimensional array. Rows represent individuals and columns the different loci. Each element of the array is an integer defining the copy of a given allele at a given locus. The third dimension of the array has two layers representing a pair of homologous chromosomes.


A list of two objects of class "struct". The first element represents the genetic structure of reproductive females and the second element the genetic structure of reproductive males in the population.

See Also

newborns evolve

eriqande/glads documentation built on April 12, 2022, 9:18 a.m.