Description Usage Arguments Details Value Examples
Functions to create dispersal matrices
1 2 | create.dispersal.coord(x,a,longlat = FALSE)
create.dispersal.IM(n,m)
|
x |
A matrix of 2D (n-D) points with row denoting points, first column x/longitude, second column y/latitude (or a Spatial object that has a coordinates method). |
a |
Parameter of the Laplacian dispersal function. |
longlat |
It defines how coordinates in |
n |
Number of demes |
m |
Migration probability |
create.dispersal.coord
creates a dispersal matrix based on spatial distance between demes, using a Laplacian dispersal function:
p(i,j) = 0.5 * a * exp(-a*dist(i,j))
,
where dist(i,j)
is the spatial distance between deme i
and deme j
and 1/a
is the mean dispersal distance.
create.dispersal.IM
creates a dispersal matrix based on an island model. The probability to disperse to any n-1
non-natal patch is m/(n-1)
while the probability to stay in the natal patch is 1-m
.
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.coord(x,0.01,longlat=T)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.