[R] terminology for frames and environments
Roger D. Peng
rpeng at jhsph.edu
Mon Jun 14 04:53:03 CEST 2004
Your understanding agrees with mine. I always figured that the parent
environment is determined by the lexical scope while the parent frame is
determined by the function call stack.
Gabor Grothendieck wrote:
> In ?exists it says:
> inherits: should the enclosing frames of the environment be searched?
> I believe what it is saying is that if inherits is TRUE and it fails
> to find the variable it will look in the parent environment and
> the parent of the parent, etc. (as opposed to looking in the calling
> frame next and the caller of the caller, etc.)
> Now I thought that standard terminology in R was:
> 1. enclosing environment or parent environment if one wanted to
> refer to the parent relative to the parent/child hierarchy
> of environments
> 2. calling frame or parent frame if one
> wanted to refer to a parent relative to the environments
> corresponding to the functions in the stack
> of currently outstanding function calls
> but here we seem to be referring to a parent frame as a #1.
> Could someone please clarify what standard terminology is?
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Roger D. Peng
More information about the R-help