Programming environments such as S and Lisp-Stat have languages for perform
ing computations, data storage mechanisms, and a graphical interface. These
languages provide an interactive interface to data analysis that is invalu
able. To take full advantage of these programming environments, statisticia
ns must understand the differences between them. Ihaka and Gentleman introd
uced R, a version of S which uses a different scoping regimen. In some ways
this makes R behave more like Lisp-Stat. This article discusses the concep
t of scoping rules and shows how lexical scope can enhance the functionalit
y of a language.