isciences / exactextractr

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

Error: 'inMemory' is not an exported object from 'namespace:terra' #80

Closed arthurdegrandpre closed 2 years ago

arthurdegrandpre commented 2 years ago

Hi,

I have been trying to use exact_extract on a SpatRaster using an sf simple feature collection and obtain the following error message :

Error: 'inMemory' is not an exported object from 'namespace:terra'

It seems like inMemory is a function from the raster package, why is it expected from terra? I have been unable to fix the issue so far.

Version infos: R version 4.1.1 raster_3.4-13 sp_1.4-5 exactextractr_0.8.2 sf_1.0-2 terra_1.3-22

Any ideas?

Cheers, Arthur

dbaston commented 2 years ago

terra (also?) exports an inMemory. From the DESCRIPTION file, exactextractr requires terra >= 1.5.17, so I'm not sure you you ended up with it installed against 1.3-22. I'd try reinstalling terra and seeing what happens.

arthurdegrandpre commented 2 years ago

Good eye! My terra installation was having trouble updating and only gave a sneaky warning message instead of an error. Fully removing the package and reinstalling fixed the issue. Many thanks!