How are environments, (en)closures, and frames related?

前端 未结 2 511
没有蜡笔的小新
没有蜡笔的小新 2021-02-02 17:01

I want to better understand how environments, closures, and frames are related. I understand function closures contain an environment, environments contain a frame and an enclo

2条回答
  •  自闭症患者
    2021-02-02 17:21

    Does this extended description by John Fox address your questions?

    It has nice diagrams, but no ponies.

    There is also a description in the Fox & Weisberg book, "An R Companion to Applied Regression" (2011), starting on p. 417, or section 8.9.1. I think the above PDF, though older, is probably just as informative, if not more so (because of the diagrams). F&W is a good book, which I've plugged a couple of times before, for other useful stuff. FWIW, I didn't find any useful insights in the "R in a Nutshell" book. I don't yet have any of Chambers' books, though.

提交回复
热议问题