initial.struct: Initial Structure

View source: R/glads_funcs.R

initial.structR Documentation

Initial Structure

Description

This function generates an object of class "struct" with an initial genetic population structure for simulations.

Usage

initial.struct(N, nl, na)

Arguments

N

Number of individuals in the initial population

nl

Number of simulated loci

na

Number of alleles at each locus. This parameter set the number of alleles for all loci.

Details

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.

Value

An object of class "struct" or an array.

See Also

evolve

Examples

##Initial population size of 10 individuals with 5 biallelic loci
initial.population.size=10
n.loci=5
n.alleles.per.locus=2
initial.struct(initial.population.size,n.loci,n.alleles.per.locus)

eriqande/gids documentation built on Jan. 5, 2024, 12:31 a.m.