Description Usage Arguments Details Value Author(s)
Disperses seeds from a matrix by using a 2 dimensional dispersal kernel
1 | windDisp(SD2D, SEEDS, MASK, zeroToNULL)
|
SD2D |
Sedd Dispersal kernel 2D - |
SEEDS |
|
MASK |
|
zeroToNULL |
|
This function uses a 2D seed dispersal kernel in form of a matrix
to disperse seeds
from a seed source in form of a matrix
and returns a matrix
of the same size
containing the seed distribnution after the seeds in the original seed matrix are dispersed.
The function uses an inverse approach, by going over all cells and determining the number of seeds dispersed into the cell from all the cells under the dispersel kernel. To calculate the number of seeds dispersed into each cell, the foolowing steps are done:
1) The dispersal kernel is centered over the for which the number of seeds to be dispersed into will be calculated
2) for each cell under the dispersal kernel SD2D
the following is done
2.1) if the corresponding cell in MASK is NA
, no seeds are dispersed into this cell
2.2) for each cell under the kernel SD2D
for which the underlying MASK is not NA a binominal distributed random number is drawn with
rbinom(1, noOfSeeds, prob)
noOfSeeds
: number of seeds in the cell from which the seeds orriginate
prob
: probability from SD2D
kernel of the corresponding cell
and summed up for the whole kernel.
This function is implemented in C (windDispCpp
)
The C function requires the seed raster to be buffered by half
the width of the seed dispertsal kernel SD2D
which is done
in the function before calling the C function.
matrix
of same size as SEEDS
containing the dispersed seeds
Rainer M Krug Rainer@krugs.de
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.