cropResampleTrim | R Documentation |
Obtain the same extents and resample to the finest resolution layer.
cropResampleTrim(expertMap, maskListRaw)
expertMap |
A binary map, either as a polygon or a raster. |
maskListRaw |
A list of rasters, each corresponding to layers from which masks will eventually be made (in another function). |
See Examples.
a list
Cory Merow <cory.merow@gmail.com>,
r1 <- raster::raster(raster::extent(c(-72, -64, 41, 50)), res = c(0.008333333, 0.008333333)) raster::values(r1) <- (1:raster::ncell(r1))^2 coords <- dismo::randomPoints(r1, 4) polyg <- sp::SpatialPolygons(list(sp::Polygons(list(sp::Polygon(coords)),1))) r2 <- raster::raster(raster::extent(c(-72, -64, 41, 50)), res = c(0.008333333, 0.008333333)) raster::values(r2) <- (1:raster::ncell(r2))^3 r3 <- raster::raster(raster::extent(c(-72, -64, 41, 50)), res = c(0.008333333, 0.008333333)) raster::values(r3) <- (1:raster::ncell(r3))^0.5 maskListRaw <- list(r1, r2, r3) cropResampleTrim(expertMap = polyg, maskListRaw = maskListRaw)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.