Convert a worldMatrix object into a RasterLayer object or a worldArray object into a RasterStack object
world2raster(world) # S4 method for worldMatrix world2raster(world) # S4 method for worldArray world2raster(world)
WorldMatrix or worldArray object.
RasterLayer or RasterStack object depending on the input
Patches value are retained from the
The Raster* returned has the same extent and resolution as the
with round coordinates at the center of the cells and coordinates
at the edges of the cells.
w1 <- createWorld(minPxcor = 0, maxPxcor = 9, minPycor = 0, maxPycor = 9, data = runif(100)) r1 <- world2raster(w1) plot(r1)