Description Usage Arguments Value Examples
Calculate statistics from a gt_RasterLayer
object using
zones specified in a second gt_RasterLayer
.
1 2 3 4 |
x |
|
z |
|
matrix
object with a value for each zone (unique values in)
z
.
#' @details This function calculates the mean, median, mode, and
standard deviation in each zone. It is similar to zonal
.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
g <- gt_raster(raster::raster(matrix(runif(9), ncol=3),
crs=sp::CRS('+init=epsg:4326'),
xmn=0, xmx=3, ymn=2, ymx=10))
z <- gt_raster(raster::raster(matrix(sample(1:3, 9, replace=TRUE), ncol=3),
crs=sp::CRS('+init=epsg:4326'),
xmn=0, xmx=3, ymn=2, ymx=10))
result <- gt_zonal(g, z)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.