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.

-roger

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


or

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?

Thanks.

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


-- Roger D. Peng http://www.biostat.jhsph.edu/~rpeng/

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to