Displaying 1 result from an estimated 1 matches for "closure_environment".
2013 Aug 14
1
local variable assignment: first copies from higher frame?
...e is then applied to the new local variable, and
is then immediately changed by the assignment operation.
i only noticed this when assigning variables to entries within a
'list' structure, like so:
tempf <- function(x, local = TRUE)
{
executing_environment <- environment()
closure_environment <- parent.env(executing_environment)
print(executing_environment)
cat(str(mget("my_list", envir = executing_environment, inherits =
FALSE, ifnotfound = NA)[[1]]))
print(closure_environment)
cat(str(mget("my_list", envir = closure_environment, inherits =
FALSE...