wpZonalStatistics: wpZonalStatistics function compute zonal statistics. That is,...

Description Usage Arguments Value Examples

Description

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

Usage

1
2
wpZonalStatistics(x, y, fun = "mean", cores = NULL, minblk = NULL,
  na.rm = TRUE, silent = TRUE)

Arguments

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

Value

A data.frame with a value for each zone (unique value in zones)

Examples

1
wpZonalStatistics( x=rasterObj1, y=rasterObj2, cores=2, minblk=4  )

worldpopglobal/wpUtilities documentation built on May 29, 2019, 11:58 a.m.