[R] how to modify variables of another frame (but not global)
Thomas Lumley
tlumley at u.washington.edu
Tue Mar 23 18:13:04 CET 2004
On Tue, 23 Mar 2004, Thomas Lumley wrote:
>
> I also note that in general <<- and eval.parent() are not related. It is
> a bad idea to confuse the enclosing and parent environments, even though
> they are often the same.
>
I should probably also point out that one source of confusion is that we
have the terminology more-or-less backwards. It would be more logical to
call the lexical environment "parent" (since it is the one with
inheritance), and the calling frame "enclosing" (and the function
parent.env() is this way). However, the existence of sys.parent() in S for
the calling frame has forced the current terminology for parent.frame and
eval.parent.
-thomas
More information about the R-help
mailing list