Description Usage Arguments Value Author(s) See Also Examples
View source: R/countryCellRast.R
This function returns a list of countries and all the cell indices of a raster to it. The output can for instance be used to access the cell values of individual countries. Function is based on the function cellFromPolygon from the raster package and only considers cells whose center is within the country's polygon.
1 | countryCellRast(x, countries="DIVA GIS", rm.length0=T, cache=T, writecache=T)
|
x |
Raster file where cell index values should be calculated for |
countries |
Dataset that is used to sperate between counties. Currently only polygons from 'DIVA GIS' supported |
rm.length0 |
If TRUE, all countries with no associated cells are removed from the list |
cache |
If TRUE, will look if the output already exists in cache and read from there |
writecache |
If TRUE, will also store the newly calculated output in the cache folder |
List of countries named by their ISO codes with raster cell indices of each country
Ulrich Kreidenweis
1 | ## Not run: countryCellRast()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.