[R] documenting overridden methods (for S4 classes)

From: Rajarshi Guha <rguha_at_indiana.edu>
Date: Mon 30 Oct 2006 - 03:13:25 GMT

Hi, I'm trying to convert a package of mine to S4 classes and am stumbling when trying to correctly document some overriden methods.

I have written methods that allow one to use 'length', and various logical operators (|, &, etc) on my objects.

For example the code for my length method is:

setMethod('length', "fingerprint",

          function(x) {

and the Rd file for this method is



  Fingerprint Bit Length

  Returns the length of the fingerprint. That is, this is the length of   the entire bit string and not simply the number of bits that are on. }


      An object of class \code{fingerprint}     }

The length of the bit string
\author{Rajarshi Guha \email{rguha@indiana.edu}}

However, when I do R CMD check on the package I get the following error:

Functions/methods with usage in documentation object 'length' but not in code:   length

I have also implemented the 'as.character' method for my objects and I get a similar error for it as well.

I tried building and installing the package to see if/how it might fail. However when I did ?length, a popup came up asking me to choose which length manpage to use, so it appears to work.

I just can't figure out what the problem is in the code (since the documentation appears to be OK)

Any pointers would be appreciated.


Rajarshi Guha <rguha@indiana.edu>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE

Does Ramanujan know Polish?
-- E.B. Ross

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon Oct 30 14:19:17 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 30 Oct 2006 - 04:30:16 GMT.

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