get_incoma {comat} | R Documentation |
Create an integrated co-occurrence matrix (wecoma)
get_incoma(x, neighbourhood = 4)
x |
A RasterStack object containing categorical rasters |
neighbourhood |
The number of directions in which cell adjacencies are considered as neighbours: 4 (rook's case) or 8 (queen's case). The default is 4. |
An integrated co-occurrence matrix
library(raster) l1 = raster(matrix(sample(1:2, size = 100, replace = TRUE), ncol = 10)) l2 = raster(matrix(sample(c(9, 6, 3), size = 100, replace = TRUE), ncol = 10)) x = stack(l1, l2, l1) get_incoma(x)