[Rd] Should dots be used in generic functions?

Prof Brian Ripley ripley@stats.ox.ac.uk
Fri, 18 Jan 2002 14:07:39 +0000 (GMT)

On Fri, 18 Jan 2002, Duncan Murdoch wrote:

> When writing generic functions, should "..." arguments be routinely
> used?
> The Writing R Extensions manual says that if it is used, all
> descendant methods must use it too.  In most cases in the R library
> source, the generic has the dots, often documented as parameters for
> the descendants (e.g. profile does this).  In the case of profile, the
> descendants declare the dots, but don't make use of them.

You mean the `methods' (they are not really descendants of anything)?  If
so, you can't tell, as anyone can write a method.  In this case there are
methods profile.nls and profile.glm, and they each have arguments that the
generic and the other method does not have, so they do make use of the ...
in the generic.

Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch