Skip to content
Prev 38092 / 63424 Next

new.env does not recognize parents from subclassesof "environment"

This is a problem related to the introduction of exact= into the [[ 
and [[<- functions. As Bill says, the current method misuses 
eval.parent() when that argument is added.

However, a simpler and more efficient solution is to migrate the checks 
for subclasses of "environment" used in other base code into the code 
for [[<- (and for $<-), at which point the methods for these functions 
are no longer needed.

A solution on these lines is being tested now and will find its way into 
r-devel and 2.12 patched.

One other point about the original posting:

Please don't use constructions like env at .xData. This depends on the 
current implementation and is not part of the user-level definition. Use 
as(env, "environment") or equivalent. (In this case, the assignment of 
the object's own environment was irrelevant to the error.)

John Chambers
On 10/21/10 9:21 AM, William Dunlap wrote: