I am working on an R package that uses the spTransform function in the sp package. This function will require the rgdal function, or I get an error message:
Error in eval(expr, envir, enclos) : load package rgdal for spTransform methods
The My Imports statement in the DESCRIPTION file contains the following:
Imports: sp, rgdal
But I still get the error. However, if I explicitly load rgdal (using library(rgdal) ) before using the package, everything works fine. I assume that when my package is downloaded, rgdal is not connected, because none of my codes use it with :: , etc.
So, I think my question is: how can I make my package attached to a package that I am not explicitly using?
r
blindjesse
source share