Koenker, Roger W
2024-May-27 10:52 UTC
[Rd] Mismatches for methods registered for non-generic:
I?m trying to repair my SparseM package to meet new CRAN rules. The fun part was rewriting the arithmetic-ifs in cholesky.f ? to conform with new fortran rules. (This struck me as a bit like updating ?the wine dark seas? in Homer.) Now, my remaining trouble is that I have several functions declared as generic, e.g. setGeneric("as.matrix.coo") setMethod("as.matrix.coo","matrix.csr", function(x, nrow, ncol,eps){.csr.coo(x)}) that have been fine until now and on my fresh R version 4.4.0 (2024-04-24) are still ok with R CMD check ?as-cran but CRAN checking reveals, e.g. Check: S3 generic/method consistency, Result: NOTE Mismatches for methods registered for non-generic: as: function(object, Class, strict, ext) as.matrix.coo: function(x, nrow, ncol, eps, ?) which I interpret as regarding my generics as just S3 methods for the non-generic ?as?. Can someone advise on the best way to repair this? With best regards, and eternal gratitude for the efforts of R-core in making R a living language. Roger Koenker r.koenker at ucl.ac.uk Honorary Professor of Economics Department of Economics, UCL Emeritus Professor of Economics and Statistics, UIUC
? Mon, 27 May 2024 10:52:26 +0000 "Koenker, Roger W" <rkoenker at illinois.edu> ?????:> that have been fine until now and on my fresh R version 4.4.0 > (2024-04-24) are still ok with R CMD check ?as-cranThis extra check requires the environment variable _R_CHECK_S3_METHODS_SHOW_POSSIBLE_ISSUES_ to be set to TRUE to show the issues.> but CRAN checking reveals, e.g. > > Check: S3 generic/method consistency, Result: NOTE > Mismatches for methods registered for non-generic: > as: > function(object, Class, strict, ext) > as.matrix.coo: > function(x, nrow, ncol, eps, ?) > > which I interpret as regarding my generics as just S3 methods for > the non-generic ?as?.There are calls to S3method("as", ...) and S3method("is", ...) at the end of the NAMESPACE for the current CRAN version of SparseM. If I comment them out, the package passes R CMD check --as-cran without the NOTE and seemingly with no extra problems. -- Best regards, Ivan