
Last chance! 50% off unlimited learning
Sale ends in
adjacencyFromTransition(x)
Cell numbers are unique indices of cells in the original grid. By convention, cell numbers start with 1 in the upper-left corner of the grid and increase from left to right and from top to bottom.
r <- raster(nrows=6, ncols=7, xmn=0, xmx=7, ymn=0, ymx=6, crs="+proj=utm +units=m")
r[] <- runif(6*7)
T <- transition(r, function(x) 1/mean(x), 8)
adjacencyFromTransition(T)
Run the code above in your browser using DataLab