[Rd] Methods package: One of those strategy questions

Prof Brian Ripley ripley@stats.ox.ac.uk
Tue, 13 Nov 2001 19:46:01 +0000 (GMT)


On Tue, 13 Nov 2001, John Chambers wrote:

> Thomas Lumley wrote:
> >
> > On Tue, 13 Nov 2001, John Chambers wrote:
> >
> > > I had better mention this one separately, since until it's settled you
> > > need a workaround.
> > >
> > > If you define methods for primitives now, this does NOT create an
> > > explicit generic function for, say, "[", so that the original primitive
> > > computations still run.
> > >
> > > This means that the method dispatch has to be turned on for that
> > > function somehow else.
> >
> > Is this true whenever you define a method for a primitive or only if
> > that primitive hasn't already got methods defined for it?
> >
> >         -thomas
>
> The former, unfortunately.  As the function's name suggests,
> cacheMetaData collects and merges information about all the currently
> visible methods.  One doesn't want to do this merge on each dispatch, so
> it's triggered by any change in the visible  methods (e.g., a call to
> setMethod or a change in the search list).  So "turned on"  really
> should have been "notified of a change in the methods".
>
> If I don't hear objections, I plan to add checkMetaData to library,
> attach, and detach fairly soon, which should cover the problem.

You will do some rough performance tests?  We (including I) have forgotten
to do so a few too many times ....

Brian

-- 
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._