initial.struct: Initial Structure

Description Usage Arguments Details Value See Also Examples

View source: R/glads_funcs.R

Description

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

Usage

1
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

1
2
3
4
5
##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/glads documentation built on April 24, 2020, 11:53 a.m.