From jmc@research.bell-labs.com  Tue Nov 13 18:53:44 2001
From: jmc@research.bell-labs.com (John Chambers)
Date: Tue, 13 Nov 2001 13:53:44 -0500
Subject: [Rd] Methods package:  One of those strategy questions
References: <Pine.A41.4.33.0111130906450.38952-100000@homer33.u.washington.edu>
Message-ID: <3BF16C38.FDCA478B@research.bell-labs.com>

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.

John
-- 
John M. Chambers                  jmc@bell-labs.com
Bell Labs, Lucent Technologies    office: (908)582-2681
700 Mountain Avenue, Room 2C-282  fax:    (908)582-3340
Murray Hill, NJ  07974            web: http://www.cs.bell-labs.com/~jmc
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] Methods package: One of those strategy questions
John Chambers