Description Usage Arguments Value Author(s) See Also Examples
View source: R/countryFunRast.R
Returns values per country based on the function and the countries boundaries. Is based on the extract function from the raster package.
1 | countryFunRast(x, fun=sum, countries="DIVA GIS", cache=T)
|
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 |
magpie object with the values per country
Ulrich Kreidenweis
1 | ## Not run: countryFunRast()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.