dgg_extract | R Documentation |
Given a stars data object and shapefile, extracts the relevant data using exactextractr::exact_extract(). Stars inputs should be in raster format with x and y dimensions. This function is planned for deprecation whenever direct support for exact_extract() is better supported via stars::aggregate().
dgg_extract(dat, dgg, var = NULL, fun, progress = FALSE)
dat |
The raster data to extract. |
dgg |
Shapefile containing the DGG boundaries to use for the extraction. |
var |
The variable to extract. |
fun |
The function to pass to exactextractr::exact_extract(). |
progress |
Display the exactextractr::exact_extract() progress bar. |
dgg_extract(hyde_med, dgg_med, 'crops', 'sum')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.