[Bioc-devel] Version not updated on bioconductor site

Martin Morgan mtmorgan at fhcrc.org
Tue Aug 9 17:57:43 CEST 2011


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

>
> Does it just flag the first occurrence? Is this 'dot in the name' rule a
> recent change?  As I said, I don't get warned by checking the package under
> R2.13.1 on our systems.
>
> Cheers,
>
> Tim
>
>
> On 09/08/2011 15:31, "Kasper Daniel Hansen"<kasperdanielhansen at gmail.com>
> wrote:
>
>> 2011/8/9 Tim Yates<tyates at picr.man.ac.uk>:
>>> Ahhh, I hadn't seen the error for 1.7.8. That's me writing a stupid unit
>>> test that works locally as I have MySQL on localhost.  I'll fix that now.
>>>
>>> Not sure what the warnings:
>>>
>>>> S3 methods shown with full name in documentation object 'xmapcore.all':
>>>>    Oall.arrays¹ Oall.chromosomes¹ Oall.domains¹ Oall.est_exons¹
>>>>    Oall.est_genes¹ Oall.est_transcripts¹ Oall.exons¹ Oall.genes¹
>>>>    Oall.prediction_transcripts¹ Oall.probes¹ Oall.probesets¹
>>>>    Oall.proteins¹ Oall.symbols¹ Oall.synonyms¹ Oall.transcripts¹
>>>>
>>>> The \usage entries for S3 methods should use the \method markup and not
>>>> their full name.
>>>
>>> Are though...  I guess something has changed in the dev version of R as I'm
>>> not seeing thm here...
>>
>> I would recommend reading the (perhaps too short) section in R-exts on
>> how to document S3 methods (or is this a wrong warning where you have
>> a '.' in the name without it being an S3 method).  In general they
>> want something like this
>>    \S3method{print}{chisqGoodnessOfFit}(x, \ldots)
>> in the usage section (this is for print.chisqGoodnessOfFit)
>>
>> Kasper
>>
>>
>>
>>
>>
>>>
>>> Time for some searchng and reading ;-)
>>>
>>> Thanks again!
>>>
>>> Tim
>>>
> --------------------------------------------------------
> This email is confidential and intended solely for the...{{dropped:15}}



More information about the Bioc-devel mailing list