Description Usage Arguments Value Examples
View source: R/create.dispersal.matrix.R
Function to create a matrix givin the probability to have a type of gamete knowing the genotype of the individual before the meiose.
1 | create.probability.matrix(index,List_gene,r=0.5,List_mu)
|
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 |
A square symmetric matrix whose [i,j] element gives the probability of dispersal from deme j to deme i.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.