From h.wickham at gmail.com  Sat Sep 30 07:15:32 2006
From: h.wickham at gmail.com (hadley wickham)
Date: Sat, 30 Sep 2006 00:15:32 -0500
Subject: [Rd] Help for methods
In-Reply-To: <4510396E.6090501@r-project.org>
References: <f8e6ff050609180824y1ca82a2cm3c3520ade980f7e8@mail.gmail.com>
	<450FE1A3.8030808@cimr.cam.ac.uk>
	<f8e6ff050609190552v34d29e95m4c62b9f8c7f3841e@mail.gmail.com>
	<450FEB14.1080409@stats.uwo.ca>
	<f8e6ff050609190616h26cf45em427f3ecb8a30ca28@mail.gmail.com>
	<450FF864.20803@stats.uwo.ca> <4510396E.6090501@r-project.org>
Message-ID: <f8e6ff050609292215h3f6bff56j7ad3debb91bce702@mail.gmail.com>

>  I think the spirit of Hadley's request could be handled by introducing a
> declaration for S3 methods and by inserting S4-style alias{} lines into
> their documentation.  For example, if a function, say
> setOldGeneric("summary"),  similar to setOldClass, informed the system that
> "summary" was an S3 generic, then having an alias for "summary.lm-method" in
> the summary.lm.Rd file would allow a consistent set of documentation tools
> to work on those S3 methods and on S4 methods.

That seems like a really nice idea.  I'd imagine that a lot of the
setOldGeneric methods could be added automatically by looking for
functions of the form function(x, ...) UseMethod("...", x) - any that
were missed could then be added by hand.

Hadley




[Rd] Help for methods
hadley wickham