isciences / exactextractr

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

importing raster after October 2023 #100

Open francisvolh opened 10 months ago

francisvolh commented 10 months ago

Hi there! awesome package! thanks for the work!

I am not sure this should be an issue, but I tried checking a bit previous issue reports and found nothing.

I am migrating a huge set of scripts into terra and sf, and some of this code uses exact_extract().

I noticed (or at least I think so) it imports the raster package, and wondered if this will be an issue once they do the full migration and remove some other packages from CRAN in October. I know you only use raster for the examples (or again, I think so).

just throwing it out there! thanks for any input you may have!

@francisvolh

dbaston commented 9 months ago

I removed rgdal from Suggests: in the 0.10.0 release: https://github.com/isciences/exactextractr/commit/02dae55e31cd9c6cf935f5ad9cfc5daa1e09005a

I'm not aware of any issues with importing the raster package, and loading the current CRAN version of exactexractr produces no warnings. Is there a problem you're experiencing?

francisvolh commented 9 months ago

Hi @dbaston ! you are right! I think the issue is with sp, not raster.

I just run this test with Rstudio by writing only in the script the package and a function (it may be just Rstudio the one causing the specific warning, and not really an issue in itself, I suppose). Just by opening this script with those two lines, triggers the warning. But not really when loading the library.

image

I guess if the sp package is remaining now (from what I read in the r-spatial evolution site) this is not a problem for you to worry about. Thanks and sorry for the trouble!

@francisvolh