Learn R Programming

geocmeans (version 0.3.4)

calc_local_moran_raster: Local Moran I for raster

Description

Calculate the Local Moran I for a numeric raster

Usage

calc_local_moran_raster(rast, window)

Value

A SpatRaster or a matrix depending on the input with the local Moran I values

Arguments

rast

A SpatRaster or a matrix

window

The window defining the neighbour weights

Examples

Run this code
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_local_moran_raster(rast, w)

Run the code above in your browser using DataLab