From ross at biostat.ucsf.edu  Tue Feb  7 22:30:03 2006
From: ross at biostat.ucsf.edu (Ross Boylan)
Date: Tue, 07 Feb 2006 13:30:03 -0800
Subject: [Rd] S4 documentation
Message-ID: <1139347803.13030.48.camel@iron.psg.net>

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.

Thanks.
-- 
Ross Boylan                                      wk:  (415) 514-8146
185 Berry St #5700                               ross at 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



[Rd] S4 documentation
Ross Boylan