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
bodenho...@bioinf.jku.at <mailto:bodenho...@bioinf.jku.at>
http://www.bioinf.jku.at/ <http://www.bioinf.jku.at>

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to