Description Usage Arguments Value
This applies a migration
operation to a given Raster* object.
1 2 3 4 |
x |
The Raster* to apply the migration operation to. |
migration |
The |
kern |
Weighting kernel applied to distances. |
sigma |
Distance scaling for kernel. |
radius |
Maximum distance away to truncate the kernel. |
normalize |
Normalize the kernel so that the total sum of weights is equal to this; pass NULL to do no normalization. |
n.weights |
The resulting operator is x -> (1-sum(n.weights)) * x + n.weights[1] * M x + n.weights[2] * M^2 x + ... |
A Raster* of the same form as the input.
If the factor normalize
is NULL then the result is approximately stochastic,
but may be pretty far off if the discretization is very coarse.
It is exactly stochastic if normalize
is 1;
the interpretation of normalize
more generally is the total production
per unit of x
.
However, note that even if normalize
is 1, the migration will still not be conservative
at any raster cells nearby to boundary or NA cells.
The weights in n.weights
should sum to less than 1.
It is not necessarily possible to do exactly the same thing with migrate()
and with migrate_raster()
.
One difference is that this function takes local averages, which does not preserve mass,
whereas migrate()
, with normalize=1
, does preserve mass.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.