Readonly
currentThe currently active environment (the stack is represented by the currently active IEnvironment#parent). Environments are maintained within the dataflow graph.
Readonly
levelnesting level of the environment, will be 0
for the global/root environment
First of all, yes, R stores its environments differently, potentially even with a different differentiation between the
baseenv
, theemptyenv
and other default environments. Yet, during dataflow we want sometimes to know more (static reference information) and sometimes know less (to be honest we do not want that, but statically determining all attached environments is theoretically impossible --- consider attachments by user input). One example would be maps holding a potential list of all definitions of a variable, if we do not know the execution path (like withif(x) A else B
).