[R-pkg-devel] Needing rgeos from sf

Roy Mendelssohn - NOAA Federal roy@mende|@@ohn @end|ng |rom no@@@gov
Thu Jul 25 21:47:58 CEST 2019

Okay I added rgeos but now it can't find rgdal.  as in:

> Error: processing vignette 'using_plotdap.Rmd' failed with diagnostics:
> package 'rgdal' is not available
> --- failed re-building 'using_plotdap.Rmd'

A question I asked before is if there is anyway to check that 'rgdal' and 'rgeos' are properly installed on the winbuider servers, as well as 'sf' and 'sp'?  'devtools::check()' on my mac produces no errors,  same with  'rhub' using Fedora,  but I get the same errors on 'rhub' using Windows.    So it appears to be a problem with Windows,  and again I am not calling these packages directly so I should not need to Import them.



> On Jul 25, 2019, at 12:38 PM, Duncan Murdoch <murdoch.duncan using gmail.com> wrote:
> 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

"The contents of this message do not reflect any position of the U.S. Government or NOAA."
Roy Mendelssohn
Supervisory Operations Research Analyst
Environmental Research Division
Southwest Fisheries Science Center
***Note new street address***
110 McAllister Way
Santa Cruz, CA 95060
Phone: (831)-420-3666
Fax: (831) 420-3980
e-mail: Roy.Mendelssohn using noaa.gov www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.

More information about the R-package-devel mailing list