isciences / exactextractr

R package for fast and accurate raster zonal statistics
https://isciences.gitlab.io/exactextractr/
281 stars 26 forks source link

exactextractr weighted summation command #7

Closed ianhardman closed 5 years ago

ianhardman commented 5 years ago

I am curious about documentation for the exactextractr package. I have installed it, but am unclear on what commands are available within it. Specifically, I would like to produce a weighted sum of raster values within a polygon grid where some rasters are only partially covered by the polygons. Is this possible with exact_extract?

Thank you

dbaston commented 5 years ago

Hi @ianhardman , I've just posted docs to http://exactextractr.s3-website.us-east-2.amazonaws.com/

You should be able to get what you're looking for with exact_extract(rast, polys, 'sum')

Note that the string 'sum' is being passed, not the R sum function.

ianhardman commented 5 years ago

Thank you! I'll give it a shot