[Bioc-devel] Unreproducible build check warning

Antti Honkela antti.honkela at hiit.fi
Mon Mar 17 20:06:29 CET 2014


Hi Valerie & Hervé,

Thanks a lot, I will try adding the new alias!

I am still baffled by the other half of the mystery, i.e. that the build 
check warning appeared to the reports about a week ago and I still 
cannot see it on my own R-3.1.0 alpha build.

Any ideas why this would work differently on the build daemon machines 
compared to 
http://cran.r-project.org/src/base-prerelease/R-alpha_2014-03-16_r65200.tar.gz?


Antti


On 2014-03-17 20:38 , Hervé Pagès wrote:
> 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
>>>
>>
>>
>

-- 
Antti Honkela
antti.honkela at hiit.fi   -   http://www.hiit.fi/u/ahonkela/



More information about the Bioc-devel mailing list