migrate: Migration function

Description Usage Arguments Details Value See Also

View source: R/glads_funcs.R

Description

A function for the migration of individuals between populations.

Usage

1
migrate(G1, G2, rate1to2, rate2to1)

Arguments

G1

An object of class "struct" with the genetic structute of the first population.

G2

An object of class "struct" with the genetic structute of the second population.

rate1to2

A numerical value indicating the rate at which individuals in G1 migrate to G2

rate2to1

A numerical value indicating the rate at which individuals in G2 migrate to G1

Details

The function is used internally in the function evolve() in order to allow the migration of individuals between populations. This function returns a list of two-dimensional arrays that represents a pair of homologous chromosomes. 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.

Value

A list of two objects of class "struct" representing the new genetic structures of populations after migration.

See Also

evolve


eriqande/glads documentation built on April 24, 2020, 11:53 a.m.