setExtent | R Documentation |
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
extent
, Extent-class
r <- raster()
bb <- extent(-10, 10, -20, 20)
extent(r) <- bb
r <- setExtent(r, bb, keepres=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.