[Rd] Strange, most probably unjustified, codoc mismatch for S4 method with one argument plus '...' (re-try)

From: Ulrich Bodenhofer <bodenhofer_at_bioinf.jku.at>
Date: Fri, 14 Dec 2012 09:46:43 +0100


Hi,

I just figured out that I accidentally posted my message in HTML, so I am retrying in plain text only. Sorry.

I am currently extending one of our CRAN packages and ran into an unexpected problem when checking the source package. I got some warnings in the step "* checking for code/documentation mismatches". I double checked everything and did not see anything that would actually justify this warning. After testing around for quite a while, I think I can now pinpoint the problem. In order to make myself clear, I need to explain the situation in more detail:

The default method (passed as def argument of setGeneric()) has the formal argument list (x, y, ...). Suppose I want to register a method with a signature without y, say signature(x="matrix", y="missing"). If I pass a function to setMethod() that only has the argument x,i.e. function(x) {...}, everything works well. It also works well if I register a function with additional arguments, e.g. function(x, dummy=NULL, ...){...} (note: y is missing in the definition). However, if I try to register a function with two formal arguments, x and '...', i.e.function(x, ...){...}, I get the warning that argument y is present in the code but missing in the documentation , although it is actually NOT in the code. In order to make this reproducible for everybody, I put together a little dummy package in which one of the methods leads to exactly this warning:

    http://www.bioinf.jku.at/people/bodenhofer/codocMismatchTest_0.0.1.tar.gz

Just run 'R CMD check' on this archive and you'll see. You will also see from the code and the corresponding documentation that the warning seems unjustified. I tried the following R versions: 2.12.1, 2.13.0, 2.13.1, 2.14.0, 2.14.1, 2.15.0, 2.15.1, 2.15.2, 2.16.0 (devel), and all consistently gave the same warning.

Is this a bug or is there a special reason for this behavior? Any help is gratefully appreciated!

Thanks in advance and best regards,
Ulrich



*Dr. Ulrich Bodenhofer*

Associate Professor
Institute of Bioinformatics

*Johannes Kepler University*

Altenberger Str. 69
4040 Linz, Austria

Tel. +43 732 2468 4526
Fax +43 732 2468 4539
bodenhofer_at_bioinf.jku.at <mailto:bodenhofer_at_bioinf.jku.at> http://www.bioinf.jku.at/ <http://www.bioinf.jku.at>



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 14 Dec 2012 - 08:54:46 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 15 Dec 2012 - 11:52:58 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive