Description Usage Arguments Value Examples
wpZonalStatistics function compute zonal statistics. That is, cross-tabulate the values of a Raster* object based on a "zones" RasterLayer. NA values are removed. Function uses DoParallel library to work with a big raster data
1 2 | wpZonalStatistics(x, y, fun = "mean", cores = NULL, minblk = NULL,
na.rm = TRUE, silent = TRUE)
|
x |
Raster* object |
y |
RasterLayer object with codes representing zones |
fun |
The function to be applied. Either as character: 'mean', 'min', 'max' and 'sum' |
cores |
Integer. Number of cores for parallel calculation |
minblk |
Integer. Minimum number of blocks |
na.rm |
using na.rm = TRUE for missing data |
silent |
If FALSE then the progress will be shown |
A data.frame with a value for each zone (unique value in zones)
1 | wpZonalStatistics( x=rasterObj1, y=rasterObj2, cores=2, minblk=4 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.