Re: [Bioc-devel] [Rd] Conflicting definitions for function redefined as S4 generics

2014-03-26 Thread Michael Lawrence
The BiocGenerics package was designed to solve this issue within Bioconductor. It wouldn't be the worst thing in the world to depend on the simple BiocGenerics package for now, but ideally the base generics would be defined higher up, perhaps in the methods package itself. Maybe someone else has a

Re: [Bioc-devel] [Rd] Conflicting definitions for function redefined as S4 generics

2014-03-26 Thread Gabriel Becker
Perhaps a patch to R such that generics don't clobber each-other's method tables if the signatures agree? I haven't dug deeply, but simply merging the method tables seems like it would be safe when there are no conflicts. That way this type of multiplicity would not be a problem, though it wouldn'

Re: [Bioc-devel] [Rd] Conflicting definitions for function redefined as S4 generics

2014-03-26 Thread Michael Lawrence
That might be worth thinking about generally, but it would still be nice to have the base generics pre-defined, so that people are not copy and pasting the definitions everywhere, hoping that they stay consistent. On Wed, Mar 26, 2014 at 6:13 AM, Gabriel Becker wrote: > Perhaps a patch to R such

Re: [Bioc-devel] [Rd] Conflicting definitions for function redefined as S4 generics

2014-03-26 Thread Hervé Pagès
Hi, I agree. I can't think of an easy way to avoid this kind of clashes between BioC and non-BioC S4 generics, other than by having things like sort() already defined as an S4 generic in base R. Note that, just having setMethod("sort", ...) in your package Ulrich, and not putting a setGeneric()

Re: [Bioc-devel] [Rd] Conflicting definitions for function redefined as S4 generics

2014-03-27 Thread Ulrich Bodenhofer
I fully agree, Michael, that this would be a great thing to have! I have often wondered why R and the standard packages are still sticking so much to the old-style S3 flavor though S4 is part of standard R. I acknowledge that backward compatibility is important, but, as far as I got it, redefin

Re: [Bioc-devel] [Rd] Conflicting definitions for function redefined as S4 generics

2014-03-27 Thread Hervé Pagès
On 03/27/2014 02:13 AM, Ulrich Bodenhofer wrote: I fully agree, Michael, that this would be a great thing to have! I have often wondered why R and the standard packages are still sticking so much to the old-style S3 flavor though S4 is part of standard R. I acknowledge that backward compatibili

Re: [Bioc-devel] [Rd] Conflicting definitions for function redefined as S4 generics

2014-04-03 Thread Ulrich Bodenhofer
On 03/27/2014 06:31 PM, Hervé Pagès wrote: On 03/27/2014 02:13 AM, Ulrich Bodenhofer wrote: [...] For the time being, it seems I have three options: 1) not supplying the sort() function yet (it is not yet in the release, but only in my internal devel version) 2) including a dependency to BiocG

Re: [Bioc-devel] [Rd] Conflicting definitions for function redefined as S4 generics

2014-04-03 Thread Michael Lawrence
On Thu, Apr 3, 2014 at 4:33 AM, Ulrich Bodenhofer wrote: > On 03/27/2014 06:31 PM, Hervé Pagès wrote: > >> On 03/27/2014 02:13 AM, Ulrich Bodenhofer wrote: >> >>> [...] >>> >>> >>> For the time being, it seems I have three options: >>> >>> 1) not supplying the sort() function yet (it is not yet in