The Scope of Names (Introduction to Statistical Computing)

Three-Toed Sloth 2013-09-25

Summary:

Undelivered optional lecture on Scope: R looks for the values of names in the current environment; if it cannot find a value, it looks for the name in the environment which spawned this one, and so on up the tree to the common, global environment. Assignment is modifying the name/value association list which represents the environment. The scope of a name is limited by the current environment. Implications: changes within the current scope do not propagate back to the larger environments; changes in the larger environment do propagate to all smaller ones which it encloses, unless over-ridden by local names. Subtlety: the larger environment for a function is the one in which it was defined, not the one in which it is called. Some implications for design. Examination of the last homework from this stance.

(I've decided not to actually give this lecture this year, in the interest of fitting in more substantive statistical and data-processing content, but also to post it for reference.)

Introduction to Statistical Computing

Link:

http://bactra.org/weblog/1055.html

From feeds:

Statistics and Visualization ยป Three-Toed Sloth

Tags:

Date tagged:

09/25/2013, 05:40

Date published:

09/25/2013, 05:40