[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
Sat Jan 29 07:43:03 CET 2022


Clear enough ! Many thanks. Me too I am not an expert in this but at 
least, now, I understand it is not due to some mis-programming in the 
package. Hope that people able to deal with the R core an namespace 
management will handle this one day.

Best,

Patrick


Le 28/01/2022 à 17:35, Zhian Kamvar a écrit :
> I've run into deep dependencies registering methods that mess things 
> up before: https://github.com/thibautjombart/adegenet/issues/308.
> AFAICT, it has something to do with the way R deploys methods where 
> they can be available if the namespace is available. In this case, 
> it's via spdep -> spData -> raster. That being said, I am NOT an 
> expert on this and would like to know more if anyone has better insight.
>
>
> On Fri, Jan 28, 2022 at 7:46 AM Patrick Giraudoux 
> <patrick.giraudoux using univ-fcomte.fr> wrote:
>
>     OK. Thanks Zhian. However what suprises me is that pgirmess namespace
>     does not import any function from raster nor uses ‘direction’ or
>     ‘gridDistance’ and the package raster is not imported from the
>     description file. raster is not in the Suggests either...
>
>     So I wonder why loading pgirmess can trigger such an error... and
>     depends on loading other packages before (such as Matrix !) in such
>     case (but generally not, and never on CRAN checks).
>
>
>     Le 28/01/2022 à 16:26, Zhian Kamvar a écrit :
>     > The reason why Rtools was suggested was because CRAN takes some
>     time
>     > for the binaries to be built and people were trying to install
>     it just
>     > after raster was released.
>     > The solution is for the user to re-install the raster package from
>     > CRAN in a fresh R environment.
>     >
>     > All the best,
>     > Zhian
>     >
>     >
>     > On Fri, Jan 28, 2022 at 6:03 AM Patrick Giraudoux
>     > <patrick.giraudoux using univ-fcomte.fr> wrote:
>     >
>     >     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]]
>     >
>     >     ______________________________________________
>     > R-package-devel using r-project.org mailing list
>     > https://stat.ethz.ch/mailman/listinfo/r-package-devel
>     >
>
>             [[alternative HTML version deleted]]
>
>     ______________________________________________
>     R-package-devel using r-project.org mailing list
>     https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list