[Rd] quieting the "apparent S3 methods" warning

Gergely Daróczi daroczig at rapporter.net
Sun Apr 19 23:18:29 CEST 2015


Dear All,

I have a similar issue that I would like to resolve before submitting a new
version of a package to CRAN: I have a "pander" S3 method and a function
called "pander.return", which a wrapper around the first (capturing the
output of "pander"). Now I'm aware of the fact, that it should have been
called rather "pander_return", but this decision was made 3 years ago, and
I cannot rename it without breaking functionality in the depending packages.

Is there any way in the means of added roxygen tag, direct edits to the Rd
or NAMESPACE file so that I can remove the "Found the following apparent S3
methods exported but not registered" NOTE from "R-devel CMD check
--as/cran"?

Thank you,
Gergely

On Fri, Mar 20, 2015 at 8:40 AM, Skye Bender-deMoll <skyebend at skyeome.net>
wrote:

> Dear R-devel,
>  Recent versions of R CMD check have been flagging apparent S3 methods
> that are not registered in the NAMESPACE as such.  In most situations this
> is very helpful.  However, I have few cases in existing packages where we
> have unfortunately named functions using a "." in them that makes them
> appear as S3 methods when they are not.
>
> As there is no existing class corresponding to the last suffix of the
> function, I could quiet the warning by registering the "fake" S3 function,
> but this seems contrary to the intent and not very future-proof.
>
> Is there a way to register methods as "non-S3 methods" so as to block any
> potential S3 dispatch? Or is there any other way to quiet the warning?  In
> the long term, I imagine we can deprecate the function and replace it with
> a better name?
>
> best,
>  -skye
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


More information about the R-devel mailing list