isciences / exactextractr

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

default 'max' function returning only NA's #74

Closed nicolassander closed 2 years ago

nicolassander commented 2 years ago

The default 'count' function is returning values, but when I use the default 'max' function only NA's are returned. Is there something I need to add?

dbaston commented 2 years ago

I can't think of a reason why that should happen off-hand, assuming the values returned by count are nonzero. Do you have data you can share?

nicolassander commented 2 years ago

I had an issue with raster package saying rgeos was not installed when trying to call the example: prec_rast <- getData('worldclim', var='prec', res=10). I installed it and reran my exact_extract code and now the 'max' function is working as expected. Could it be linked to that?