[R-pkg-devel] Needing rgeos from sf
On 25/07/2019 3:21 p.m., Roy Mendelssohn - NOAA Federal via
R-package-devel wrote:
I have been testing a package for resubmission with bug fixes. On the present CRAN builds I get:
Result: NOTE
Namespaces in Imports field not imported from:
?mapdata? ?maptools? ?plot3D? ?rgdal? ?rgeos?
All declared Imports should be used.
However, if I remove rgeos from the imports I get from win builder:
Error in st_as_sfc.SpatialPolygons(sp::geometry(x), ...) :
package rgeos required for finding out which hole belongs to which exterior ring
Note that I am not calling 'rgeos', either 'sf' or 'sp' is, but does not appear to be properly importing all the need namespaces. Best way to proceed? Include rgeos in Import and get the Note, or ????
A simple workaround would be to add a function that calls something from rgeos just to satisfy the check, e.g. # Just to satisfy the checks... dummy <- function() rgeos::getScale() I don't think there are warnings if dummy is never used or exported, but if there are, I think that's a pretty harmless call to make. Duncan Murdoch