# NOT RUN {
r <- rast(nrows=10, ncols=10, xmin=0)
values(r) <- 1:ncell(r)
#autocor(r)
# rook's case neighbors
#f <- matrix(c(0,1,0,1,0,1,0,1,0), nrow=3)
#autocor(r, f)
## local
#rc <- autocor(r, w=f, global=FALSE)
# }
Run the code above in your browser using DataLab