[Rd] Reference classes and ".requireCachedGenerics"
jmc at r-project.org
Tue Feb 15 21:52:00 CET 2011
No worries, and we will get rid of the warning message.
Certain of the S4 classes require methods for particular primitive
functions. If a subclass of one of those classes is loaded from a
package, then we need to turn on method dispatch for the corresponding
primitive(s). For efficiency, this information is precomputed and
stored in the variable you mentioned. It's quite reasonable for several
instances to be encountered. Nothing specific to reference classes
except that they need, e.g., methods for `$`.
The variable name can be added to a "dont.mind" list to suppress the
Thanks for the catch.
On 2/15/11 9:45 AM, Jon Clayden wrote:
> Dear all,
> If I load a package which creates reference classes whilst another
> such package is also loaded, I get a warning about masking of the
> ".requireCachedGenerics" variable. (FWIW, both packages are
> lazy-loaded.) Googling this variable name turned up only one previous
> discussion, which didn't immediately help, except to suggest that it
> may be related to my defining an S3 method for one or more of the
> classes. It also pointed me at bits of the R source, but it wasn't
> obvious to me from that, what this variable is for.
> Aside from being a nuisance, I wonder if this is indicative of a
> problem on R's side or on mine, so I'd be glad for any clarification.
> This is R 2.12.1 on Mac OS X.6.6, though it still happens with the new
> 2.12.2 beta. Any feedback welcome.
> R-devel at r-project.org mailing list
More information about the R-devel