Set the extent of a RasterLayer
setExtent sets the extent of a Raster* object. Either by providing a new Extent object or by setting the extreme coordinates one by one.
setExtent(x, ext, keepres=FALSE, snap=FALSE) extent(x) <- value
x |
A Raster* object |
ext |
An object of class Extent (which you can create with |
keepres |
logical. If |
snap |
logical. If |
value |
An object of class Extent (which you can create with |
a Raster* object
r <- raster() bb <- extent(-10, 10, -20, 20) extent(r) <- bb r <- setExtent(r, bb, keepres=TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.