[Bioc-devel] Version not updated on bioconductor site
Tim Yates
tyates at picr.man.ac.uk
Wed Aug 10 11:24:45 CEST 2011
Hi Martin,
Ahhh, I see... I hadn't come across that code convention before... Just
goes to show, there's always stuff to learn!
I guess the only proper solution would be to rename all the methods in our
package to not contain dots.
I'll have a think and see if I can come up with a nice way of doing this, as
this would break anyone's code that uses our package.
Sometimes seemingly (at the time) arbitrary decisions from 4+ years ago can
come back to haunt you ;-)
Thanks for the explanation!
Tim
On 09/08/2011 16:57, "Martin Morgan" <mtmorgan at fhcrc.org> wrote:
> On 08/09/2011 07:57 AM, Tim Yates wrote:
>> Hi Kasper,
>>
>> They are not S3 methods, but they do have a dot in the name;
>>
>> all.transcripts
>> all.genes
>>
>> Etc... What I don't understand, is I have other methods, eg;
>>
>> gene.details
>>
>> Which also contain dots in the name, but are not flagged up by this warning.
>
> 'all' is a generic function (see ?all) whereas 'gene' is not.
>
> The function all.genes is a method on all, whether you like it or not.
> Objects of class 'genes' get dispatched to all.genes
>
>> all.genes = function(...) "all.genes"
>> g = structure(list(), class="genes")
>> all(g)
> [1] "all.genes"
>> all(unclass(g))
> [1] TRUE
>
> So the advice is to avoid dots in function names.
>
> Martin
>
--------------------------------------------------------
This email is confidential and intended solely for the u...{{dropped:12}}
More information about the Bioc-devel
mailing list