Description Usage Arguments Value
View source: R/utility_functions.R
Converts a sf data frame to PRIO-GRID as a crossection.
1 | vector_to_pg(sfdf, variable, fun, need_aggregation = TRUE, missval = -1)
|
sfdf |
a sf (simple features) data frame |
variable |
the variable to convert to PRIO-GRID |
fun |
aggregation function. only used if need_aggregation is TRUE. |
need_aggregation |
if FALSE, will use velox, which only extracts the last value for each feature. fast when applicable. |
missval |
only used if need_aggregation is FALSE. velox sets missing data to this value. |
A raster with same extent and crs as PRIO-GRID.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.