From ken.knoblauch at inserm.fr  Wed Nov 11 21:58:08 2009
From: ken.knoblauch at inserm.fr (Ken Knoblauch)
Date: Wed, 11 Nov 2009 20:58:08 +0000 (UTC)
Subject: [Rd] Clarification on generic functions and methods
References: <59d7961d0911110743y72b7feeaya788095b0a19d1ab@mail.gmail.com>
	<C0772C7568B5374481D2F8A880E9BBDF5B4E0431@DC1EX07CMS.air.org>
Message-ID: <loom.20091111T215615-32@post.gmane.org>

Doran, Harold <HDoran <at> air.org> writes:
> 
> Thank you, Henrik. This actually doesn't work when I build the package, 
which may only require a slight
> modification to what I'm doing now. First, I create a NAMESPACE as:
> 
> ### NAMESPACE FILE CONTENTS
> export(jml2)
> S3method(jml2, fit)
> S3method(jml2, default)
> S3method(jml2, formula)
> S3method(print, jml)
> S3method(summary, jml)
> S3method(print, summary.jml)
> 
> So, only the generic function (jml) is exported. 
> 
> Now, I do as you suggest below for the generic function, but keep all others 
as they were previously. That
> creates a situation where jml.formula, jml.default, and jml have different
 arguments.
> 
> Now, in the .Rd file for the jml function I want the user to see the usage for 
the jml.formula method, which
> obviously has more args than "...". So, the .Rd file is structured as
 (for testing purposes only):

How about if you document the default method as well as the generic
method in your man page.  See ?lag for an example, and I've come
across several others recently.

HTH,

Ken

-- 
Ken Knoblauch
Inserm U846
Stem-cell and Brain Research Institute
Department of Integrative Neurosciences
18 avenue du Doyen L?pine
69500 Bron
France
tel: +33 (0)4 72 91 34 77
fax: +33 (0)4 72 91 34 61
portable: +33 (0)6 84 10 64 10
http://www.sbri.fr/members/kenneth-knoblauch.html



[Rd] Clarification on generic functions and methods
Ken Knoblauch