[R] terminology for frames and environments

Gabor Grothendieck ggrothendieck at myway.com
Mon Jun 14 22:34:15 CEST 2004


Thomas Lumley <tlumley <at> u.washington.edu> writes:

> The distinction between "environment" and "frame" is important. The frame
> is what you find things in with get(, inherits=FALSE) and the environment
> uses get(, environment=TRUE).

The thing I find odd about this one is that if we have:

e <- new.env()
e$x <- 1
f <- new.env(parent=e)
f$x  # gives an error

then I would have expected x to be returned since f is an environment
and x is in that environment.  On the other hand, if an environment
is defined to be the same as a frame (and there is some other word for 
an environment and its ancestors) then the above notation makes sense.




More information about the R-help mailing list