extract {vegsoup} | R Documentation |
Extract the values of the cells of a "raster*"
object for the locations (SpatialPoints
) of a Vegsoup
object; that is perform a spatial query.
## S4 method for signature 'Vegsoup' extract(x, y, ...)
x |
A |
y |
A |
... |
Additional arguments passed to |
See the the documentation of extract
in raster for
details and additional arguments.
A vector for RasterLayer objects and a matrix for a RasterStack or RasterBrick object. A list
if a buffer
argument is used or data.frame df=TRUE
.
Roland Kaiser
require(raster) # RasterLayer r1 <- raster(ncol = 10, nrow = 10, xmn = 0, xmx = 1, ymn = 0, ymx = 1) r1[] <- sample(1:ncell(r1)) x <- coenoflex() plot(r1) points(x) extract(r1, x) # a vector # RasterStack and RasterBrick r2 <- raster(ncol = 10, nrow = 10, xmn = 0, xmx = 1, ymn = 0, ymx = 1) r2[] <- sample(1:ncell(r2)) s <- stack(r1, r2) b <- brick(r1, r2) extract(s, x) # a matrix extract(b, x) # a matrix