[R-pkg-devel] "apparent S3 methods" note in R CMD check

Thomas Petzoldt thomas.petzoldt at tu-dresden.de
Fri Jun 12 10:11:49 CEST 2015

Dear Martin, dear package developers,

I had a very similar case three days ago in one of our packages. Our aim
was to provide an S3 method matplot.deSolve and an alternative and more
specific non-S3 function matplot.1D because the .1D follows the naming
scheme of other related functions.

The note of R 3.2.0 could be suppressed by (wrongly) declaring the
non-S3 variant as S3method, but finally I decided to use an
S4-compatibility approach instead:

setGeneric("matplot", function(x, ...) graphics::matplot(x, ...))

setMethod("matplot", list(x = "deSolve"), matplot.deSolve)

... with the downside that deSolve::matplot now masks graphics::matplot

So I would appreciate if matplot could be made a generic. Or is there
another way round?


Dr. Thomas Petzoldt
Technische Universitaet Dresden
Faculty of Environmental Sciences
Institute of Hydrobiology
01062 Dresden, Germany

E-Mail: thomas.petzoldt at tu-dresden.de

More information about the R-package-devel mailing list