countryFunRast: Return function values per country

Description Usage Arguments Value Author(s) See Also Examples

View source: R/countryFunRast.R

Description

Returns values per country based on the function and the countries boundaries. Is based on the extract function from the raster package.

Usage

1
countryFunRast(x, fun=sum, countries="DIVA GIS", cache=T)

Arguments

x

Raster file where function is applied to

fun

Function that is applied to the raster values. E.g. 'sum' sums up raster values per country

countries

Dataset that is used to sperate between counties. Currently only polygons from 'DIVA GIS' supported

cache

If TRUE, will read the countries boundaries from cache if available

Value

magpie object with the values per country

Author(s)

Ulrich Kreidenweis

See Also

countryCellRast

Examples

1
## Not run: countryFunRast()

pik-piam/geodata documentation built on Nov. 5, 2019, 12:21 a.m.