Hello,

I got the hint to use nesting environments (for a GUI problem), but I'm not sure whether I understand what he means (and I did not really succeed with reading documentation - probably I looked for the wrong keywords?).
That's what he wrote:

> Another good way to control the scoping is nesting environments (e.g. through closures). That is, your object does not need to be global (in the workspace) but it can be in a parent environment. In fact, global variables won't even work when you put your code into a namespaced pacakge, because the namespace will be locked.

Can anybody explain it (probably with a simple example)
That would be great!

Thanks,
Antje

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to