[Rd] S4 documentation

From: Ross Boylan <ross_at_biostat.ucsf.edu>
Date: Tue 07 Feb 2006 - 21:30:03 GMT

  1. promptClass generated a file that included \section{Methods}{ No methods defined with class "mspathDistributedCalculator" in the signature. } Yet there are such methods. Is this a not-working yet feature, or is something funny going on (maybe I have definitions in the library and in the global workspace...)?
  2. Is the \code{\link{myS4class-class}} the proper way to cross-reference a class? \code{\link{myS4method-method}} the right way to refer to a method? I looked for something like \class or \method to correspond to \code, but didn't see anything.
  3. This question goes beyond documentation. I have been approaching things like this: setClass("A", ....) foo <- function(a) .... setClass("B", ...) setMethod("foo", "B", ....) so the first foo turns into the default function for the generic.

This was primarily motivated by discovering that setMethod("foo", "A") where I have the first function definition produced an error.

Is this a reasonable way to proceed?

Then do I document the generic with standard function documentation for foo? Are there some examples I could look at? When I want to refer to the function generically, how do I do that?

I'm using R 2.2.1, and I've found the documentation on documenting S4 a bit too brief (even after looking at the recommended links, which in some cases don't have much on documentation). Since the docs say it's a work in progress, I'm hoping to get the latest word here.


Ross Boylan                                      wk:  (415) 514-8146
185 Berry St #5700                               ross@biostat.ucsf.edu
Dept of Epidemiology and Biostatistics           fax: (415) 514-8150
University of California, San Francisco
San Francisco, CA 94107-1739                     hm:  (415) 550-1062

R-devel@r-project.org mailing list
Received on Wed Feb 08 08:37:57 2006

This archive was generated by hypermail 2.1.8 : Wed 08 Feb 2006 - 18:58:44 GMT