Description Usage Arguments Value
The function computes, serially or in parallel, the spatial Rao's index on each layer of a raster stack on a moving window around a center pixel.
The serial computation is carried out through the raster::focal
function.
The parallel computation takes advantage of the spatial.tools::rasterEngine
function. The parallel cluster has to be initialized beforehand calling
the returned function by spatial.tools::sfQuickInit
.
1 2 | spatial_rao_maker(raster_stack, window_dims_v, parallel = FALSE,
is_rao = TRUE)
|
raster_stack |
a raster stack of layers that will be used by the returned function to calculate Rao'index |
window_dims_v |
a 2 element numeric vector of the count of x and y pixels for the moving window |
parallel |
whether or not to calculate the index in parallel |
is_rao |
boolean to get Rao's index back (default) or Shannon's index |
a function accepting a numeric index relative to the layer
of the raster_stack
where Rao's index has to be calculated
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.