Re: [Rd] Overloading S4 methods

2011-06-08 Thread John Chambers
The bug should be fixed in r-devel and 2.13 patched, as of svn rev. 56090. John On 6/7/11 12:42 AM, Iago Mosqueira wrote: On Mon, Jun 6, 2011 at 11:28 PM, John Chambersj...@r-project.org wrote: This is a bug, medium-subtle, but also raises an interesting software design point. The Bug:

Re: [Rd] Overloading S4 methods

2011-06-07 Thread Iago Mosqueira
On Mon, Jun 6, 2011 at 11:28 PM, John Chambers j...@r-project.org wrote: This is a bug, medium-subtle, but also raises an interesting software design point. The Bug: Nothing specific about ANY and missing, but the issue is whether the method was inherited (the ANY case) or defined directly

Re: [Rd] Overloading S4 methods

2011-06-07 Thread luke-tierney
On Mon, 6 Jun 2011, John Chambers wrote: This is a bug, medium-subtle, but also raises an interesting software design point. The Bug: Nothing specific about ANY and missing, but the issue is whether the method was inherited (the ANY case) or defined directly (the missing case). Generic

Re: [Rd] Overloading S4 methods

2011-06-07 Thread John Chambers
Yes, Dylan is in many ways more authoritarian than R! Possibly also with fewer users to be annoyed. We might go to a warning as Iago suggests. If we did add a warning, it would be likely be more useful in the setMethod() call than at CMD check time, after the package has been designed and

Re: [Rd] Overloading S4 methods

2011-06-07 Thread luke-tierney
On Tue, 7 Jun 2011, John Chambers wrote: Yes, Dylan is in many ways more authoritarian than R! Possibly also with fewer users to be annoyed. Huh? A convention in a programming book is more authoritarian than a warning as you are proposing (not that I am opposed to that -- I think it's

Re: [Rd] Overloading S4 methods

2011-06-07 Thread Iago Mosqueira
Can then the warning be turned off in any way to avoid it showing up on check? Maybe an argument to confirm 'I know what I am doing so I need no warning, thank you very much'. Iago On Tue, Jun 7, 2011 at 7:06 PM, John Chambers j...@r-project.org wrote: Yes, Dylan is in many ways more

Re: [Rd] Overloading S4 methods

2011-06-07 Thread John Chambers
On 6/7/11 2:02 PM, Iago Mosqueira wrote: Can then the warning be turned off in any way to avoid it showing up on check? Maybe an argument to confirm 'I know what I am doing so I need no warning, thank you very much'. Well, this is still new territory since the bug didn't seem to have been

Re: [Rd] Overloading S4 methods

2011-06-06 Thread Iago Mosqueira
On Wed, Jun 1, 2011 at 6:04 PM, Martin Morgan mtmor...@fhcrc.org wrote: On 06/01/2011 04:39 AM, Iago Mosqueira wrote: Dear all, I am experiencing some problems with S4 method overloading. I have defined a generic for graphics:plot, using setGeneric(plot, useAsDefault = plot) and with

Re: [Rd] Overloading S4 methods

2011-06-06 Thread John Chambers
This is a bug, medium-subtle, but also raises an interesting software design point. The Bug: Nothing specific about ANY and missing, but the issue is whether the method was inherited (the ANY case) or defined directly (the missing case). Generic functions keep a cached table of dispatched

[Rd] Overloading S4 methods

2011-06-01 Thread Iago Mosqueira
Dear all, I am experiencing some problems with S4 method overloading. I have defined a generic for graphics:plot, using setGeneric(plot, useAsDefault = plot) and with importFrom('graphics', 'plot') and exportMethods('plot') in the NAMESPACE file of pkg A. I then proceed to define a method