From h.wickham at gmail.com  Wed Oct  9 23:08:15 2013
From: h.wickham at gmail.com (Hadley Wickham)
Date: Wed, 9 Oct 2013 16:08:15 -0500
Subject: [Rd] No warning for conflicting methods?
In-Reply-To: <CABdHhvEUJoJNAxe4HaDTvaY3=HVUpsnv2DLq1Lox0rLd6mMSOQ@mail.gmail.com>
References: <CABdHhvEUJoJNAxe4HaDTvaY3=HVUpsnv2DLq1Lox0rLd6mMSOQ@mail.gmail.com>
Message-ID: <CABdHhvGPrRHfw-+5m7HJVbswGsUkkE8OtLpxyTzoQx3wFBbKNw@mail.gmail.com>

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.

Hadley

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
http://had.co.nz/



[Rd] No warning for conflicting methods?
Hadley Wickham