[Bioc-devel] Unreproducible build check warning

Hervé Pagès hpages at fhcrc.org
Mon Mar 17 19:38:25 CET 2014


Hi Antti,

Yes it's a little bit surprising (and questionable) that
'R CMD check' requires you to define an alias that is inconsistent
with:

   - Your setMethod statement:

       setMethod("[", signature(x="scoreList"), ...

   - The output of showMethods:

       showMethods("[")
       Function: [ (package base)
       x="AffyBatch"
       [...]
       x="scoreList"
       [...]

   - The behavior of dispatch and selectMethod():

       selectMethod("[", "scoreList")  # works as expected

But, as Val pointed out, 'R CMD check' is the boss, and the only way
to make the warning go away is by adding the alias that 'R CMD check'
wants to see. Note that this alias suggests that the [ generic has
only 2 arguments in its signature so is not even consistent with the
signature of the generic (the [,scoreList,ANY,ANY,ANY-method alias
would be).

Note that the primary purpose of an alias is to make your man page
accessible by the user, not to please 'R CMD check'. So since the
user looking for documentation about the "[" method for scoreList
objects is more likely to access your man page thru your original
[,scoreList-method alias, I would recommend you keep it. Just add
the [,scoreList,ANY-method alias to please 'R CMD check'.

Cheers,
H.


On 03/17/2014 10:49 AM, Valerie Obenchain wrote:
> Hi Antti,
>
> It's looking for
>
> \alias{[,scoreList,ANY-method}
>
>
> The generic '[' can dispatch on arguments 'x', 'i' and 'j'.
>
>>> getGeneric("[")
>> standardGeneric for "[" defined from package "base"
>>
>> function (x, i, j, ..., drop = TRUE)
>> standardGeneric("[", .Primitive("["))
>> <bytecode: 0x237af30>
>> <environment: 0x21d9f18>
>> Methods may be defined for arguments: x, i, j, drop
>> Use  showMethods("[")  for currently available ones.
>
> The method you wrote for scoreList dispataches on 'x' as a scoreList
> object but doesn't specify 'i' or 'j'. One of these indices must be
> present in order for subsetting to happen. In this case (I believe) the
> default is assuming 'i' as ANY and 'j' as missing.
>
> For example, with the VCF class I've specified the method for ANY, ANY:
>
> setMethod("[", c("VCF", "ANY", "ANY"),
>      function(x, i, j, ..., drop=TRUE)
> {
> ...
>
> To see more examples,
>
> showMethods('[')
>
>
> Valerie
>
> On 03/17/2014 08:13 AM, Antti Honkela wrote:
>> Hi all,
>>
>> The latest build check report shows one warning for 'tigre':
>> ---------------------------------------
>> * checking for missing documentation entries ... WARNING
>> Undocumented S4 methods:
>>    generic '[' and siglist 'scoreList,ANY'
>> ---------------------------------------
>>
>> As far as I can tell the method in question should be documented, as one
>> of the .Rd files contains an alias:
>> \alias{[,scoreList-method}
>>
>> Furthermore I cannot reproduce it on my own using the latest R-alpha (or
>> R-devel from last week): R CMD check on the source tar-ball downloaded
>> directly from Bioconductor runs cleanly.
>>
>> Can someone please help in figuring out what is going on?
>>
>>
>> Antti
>>
>
>

-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



More information about the Bioc-devel mailing list