Closed RS-eco closed 4 years ago
I was trying to implement your weighting example, but doing so get an error message: I ran the following code:
library(raster) library(sf) library(exactextractr) # Pull municipal boundaries for Brazil brazil <- st_as_sf(getData('GADM', country='BRA', level=2)) # Pull gridded precipitation data prec <- getData('worldclim', var='prec', res=10)[[12]] # Weighting brazil$mean_prec_weighted <- exact_extract(prec, brazil, 'weighted_mean', weights=area(prec))
And receive the following error:
Error in .local(x, y, ...) : exact_extract was called with a named summary operation thatdoes not accept additional arguments ...
The weighting method is implemented in the current master branch, but has not yet been released to CRAN. Are you working with the current master ?
master
Sorry, I didn't consider that. Perfect, now it works. ;)
I was trying to implement your weighting example, but doing so get an error message: I ran the following code:
And receive the following error: