[Rd] No warning for conflicting methods?

Hadley Wickham h.wickham at gmail.com
Wed Oct 9 23:08:15 CEST 2013

As Duncan pointed to me off-list, I may have mis-diagnosed this
problem because both RMySQL and RPostgreSQL define their own
(identically named) dbObjectId classes.  So this may be a more subtle
S4 dispatch bug.


On Wed, Oct 9, 2013 at 3:21 PM, Hadley Wickham <h.wickham at gmail.com> wrote:
> It would be really nice if R warned you when packages had conflicting
> methods. For example (and this took me a couple of hours to track
> down), RMySQL and RPostgreSQL both define setMethod("print",
> "dbObjectId"), so that:
> library(RMySQL)
> getMethod("print", "dbObjectId")
> library(RPostgreSQL)
> getMethod("print", "dbObjectId")
> Obviously it's a bad idea to associate methods with classes that you
> don't own, but it would be great if R could give some warning in this
> situation.
> Hadley
> --
> Chief Scientist, RStudio
> http://had.co.nz/

Chief Scientist, RStudio

More information about the R-devel mailing list