[Rd] Clarification on generic functions and methods
Ken Knoblauch
ken.knoblauch at inserm.fr
Wed Nov 11 21:58:08 CET 2009
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
More information about the R-devel
mailing list