[R-pkg-devel] Issue: Function found when exporting methods from the namespace ‘raster’ which is not S4 generic: ‘all.equal’
    Patrick Giraudoux 
    p@tr|ck@g|r@udoux @end|ng |rom un|v-|comte@|r
       
    Fri Jan 28 09:22:58 CET 2022
    
    
  
Dear listers,
One user (in cc) has signaled a problem installing the package pgirmess 
(versin 1.7.1 on CRAN), with this message on loading:
> library(pgirmess)
Error: package or namespace load failed for ‘pgirmess’:
Function found when exporting methods from the namespace ‘raster’ which 
is not S4 generic: ‘all.equal’
In addition: Warning message:
no function found corresponding to methods exports from ‘raster’ for: 
‘direction’, ‘gridDistance’
I cannot identify where the trouble comes from since:
- pgirmess goes through OK in all the checks on CRAN
- I can install/remove it with correct loading on my own platform
- pgirmess 1.7.1 does not import 'raster' and the functions mentioned above
The user has installed the last R version on Windows.  However, she gets 
a correct loading only if she loads 'Matrix' before (or 'lme4' - but to 
my knowlege, lme4 actually loads Matrix).
She meets also the same issuer with pgirmess 2.0 (not on CRAN yet, see 
https://github.com/pgiraudoux/pgirmess however this version (still on 
test) has deprecated/dropped all functions related to dealing with rasters.
This occurs in R directly (not necessarily within RStudio).
On the web, Iook likes this issue has is already been spotted for some 
other packages (e.g. mapview, tmap, etc.). Checking help-lists I saw 
that installing rtools might solve the problem (e.g. 
https://community.rstudio.com/t/error-package-or-namespace-load-failed-for-mapview/126914) 
however, it seems to me a strange workaround since rtools should not be 
made necessary for lay R user (not developers).
Best,
	[[alternative HTML version deleted]]
    
    
More information about the R-package-devel
mailing list