[Rd] Reference classes and ".requireCachedGenerics"

John Chambers jmc at r-project.org
Tue Feb 15 23:26:31 CET 2011


PS: this is another glitch that arises when you don't use NAMESPACE 
files.  If the .requireCachedGenerics is in a NAMESPACE and not 
exported, the conflict does not arise.

On 2/15/11 12:52 PM, John Chambers wrote:
> 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
> warning.
>
> Thanks for the catch.
>
> John
>
>
> 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.
>>
>> Thanks,
>> Jon
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list