calc_moran_raster {geocmeans} | R Documentation |
Global Moran I for raster
Description
Calculate the global Moran I for a numeric raster
Usage
calc_moran_raster(rast, window)
Arguments
rast |
A SpatRaster or a matrix |
window |
The window defining the neighbour weights |
Value
A float: the global Moran I
Examples
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)
[Package geocmeans version 0.3.4 Index]