Environments can be thought of as consisting of two things:
When R looks up the vbalue for a symbol the frame is examined and if a matching symbol is found its value will be returned. If not, the enclosing environment is then accessed and the process repeated. Environments form a tree structure in which the enclosures play the role of parents. The tree of environments is rooted in an empty environment, available through emptyenv(), which has no parent. It is the direct parent of the environment of the base package (available through the baseenv() function). Formerly baseenv() had the special value {@code NULL}, but as from version 2.4.0, the use of {@code NULL} as an environment is defunct.
|
|