Computes Renyi diversity index for a given raster object. This function allows specifying window size, alpha values, and various other parameters for the calculation of the Renyi index.
Renyi(
x,
window = 3,
alpha = 1,
base = exp(1),
rasterOut = TRUE,
np = 1,
na.tolerance = 1,
cluster.type = "SOCK",
debugging = FALSE
)
A SpatRaster object or a list of calculated Renyi indices.
A raster object which can be a matrix, SpatialGridDataFrame, SpatRaster, list, or RasterStack.
The size of the moving window; must be an odd integer.
A numeric vector of alpha values for the Renyi index.
The logarithm base for the calculation, default is natural logarithm.
Logical; if TRUE, returns a SpatRaster object, otherwise returns a list.
Number of processes for parallel computation.
Tolerance level for NA values, must be within [0-1].
Type of cluster for parallel computation, either "SOCK" or "MPI".
Logical; if TRUE, provides additional console output for debugging.
if (FALSE) {
result <- Renyi(ndvi.8bit, window = 3, alpha = c(0, 1, 2))
}
Run the code above in your browser using DataLab