create.dispersal.matrix: Create probability matrix

Description Usage Arguments Value Examples

View source: R/create.dispersal.matrix.R

Description

Function to create a matrix givin the probability to have a type of gamete knowing the genotype of the individual before the meiose.

Usage

1
create.probability.matrix(index,List_gene,r=0.5,List_mu)

Arguments

index

is a matrix calculated with the function genotype.index.multilocus, indicates the row of each genotype in the simulation.

List_gene

is a list giving the number of loci and allele for each loci. The length of the list correspond to the number of loci, and each number indecates the number of alleles for this loci.

r

defines the recombinasion probability if the simulation use only two loci. If r=0.5, loci are independant, if 0<r<0.5 loci are linked. For three and more loci in the simulation, loci are concidered independant.

Value

A square symmetric matrix whose [i,j] element gives the probability of dispersal from deme j to deme i.

Examples

1
2
3
4
lon <- c(12.3, 13.3, 14.2, 16.9, 16.1, 17.5, 18.1, 19.7, 20.3)
lat <- c(45.4, 46.5, 48.9, 47.1, 45.8, 46.1, 47.0, 46.8, 47.2)
x <- cbind(lon,lat)
create.dispersal.matrix(x,0.01,longlat=T)

MarcoAndrello/MetaPopGen_0.0.8 documentation built on May 25, 2019, 12:23 p.m.