On Mon, Aug 6, 2012 at 9:03 PM, Schoenfeld, David
Alan,Ph.D.,Biostatistics <dschoenf...@partners.org> wrote:
> Thank you both, this was very helpful.  I need to study environments more. Do 
> either of you know a good source?

Disclaimer: I really have no idea what I'm talking about.

They are a somewhat subtle, but exceptionally powerful concept: see,
inter alia,

cran.r-project.org/doc/contrib/Fox-Companion/appendix-scope.pdf
http://www.lemnica.com/esotericR/Introducing-Closures/

If you know a little bit of C, it will go a long way in understanding
environments in R. You'll want to (eventually) start to associate R
names with C pointers and environments with symbol tables (hence the
fact the printed environment is just a memory address) , but that's
perhaps a little bit down the road. Environments are different in
their fundamental behavior because of this though: they're the best
way to get pass by reference in R.

Best,
Michael

______________________________________________
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