View source: R/spatial_indices.R
calc_moran_raster | R Documentation |
Calculate the global Moran I for a numeric raster
calc_moran_raster(rast, window)
rast |
A SpatRaster or a matrix |
window |
The window defining the neighbour weights |
A float: the global Moran I
Arcachon <- terra::rast(system.file("extdata/Littoral4_2154.tif", package = "geocmeans"))
names(Arcachon) <- c("blue", "green", "red", "infrared", "SWIR1", "SWIR2")
rast <- Arcachon[[1]]
w <- matrix(1, nrow = 3, ncol = 3)
calc_moran_raster(rast, w)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.