I have a package that imports raster::intersect (which depends on rgeos::gIntersection ). Previously I also had a function which imported rgeos , but I changed it so I only depend on raster directly.
But now I am getting an error in the examples and tests, saying:
> Loading required namespace: rgeos
Failed with error: 'there is no package called 'rgeos''
Error in loadNamespace(name) : there is no package called 'rgeos'
How should I deal with that? When I put rgeos under Imports in the DESCRIPTION, I will get some CRAN notes, as no function from rgeos is directly used. And leaving rgeos out completely results in errors.
Have you considered listing rgeos under Depends?
I know that using the depends field is discouraged, but it might do the trick under the circumstances.
Yes, I considered that, but I thought I would get the same CRAN notes, that I am not really using the package.
And since this NOTE only appears on Fedora, r-release-osx-x86_64 and r-oldrel-osx-x86_64 I cannot reproduce it or test it as-cran. On Windows and Linux everything looks ok.