powered by
patches
Report the cells numbers as defined for a Raster* object given the patches coordinates pxcor and pycor.
Raster*
pxcor
pycor
cellFromPxcorPycor(world, pxcor, pycor)# S4 method for worldNLR,numeric,numeric cellFromPxcorPycor(world, pxcor, pycor)
# S4 method for worldNLR,numeric,numeric cellFromPxcorPycor(world, pxcor, pycor)
Numeric. Vector of cells number.
WorldMatrix or worldArray object.
WorldMatrix
worldArray
Integer. Vector of patches pxcor coordinates. Must be of length 1 or of the same length as pycor.
Integer. Vector of patches pycor coordinates. Must be of length 1 or of the same length as pxcor.
Sarah Bauduin
w1 <- createWorld(minPxcor = 0, maxPxcor = 9, minPycor = 0, maxPycor = 9) cellFromPxcorPycor(world = w1, pxcor = 0, pycor = 9) cellFromPxcorPycor(world = w1, pxcor = c(0, 1, 2), pycor = 0)
Run the code above in your browser using DataLab