[R] on lexical scoping....
@k@h@y_e4 @end|ng |rom hotm@||@com
Tue Apr 4 15:56:04 CEST 2023
I have the following code typed at the console prompt:
y <- x*10
X has not been defined and the above code throws an object not found error. That is, the global environment does not contain x. Why doesn't it look further in the environment stack, like that of packages? There are thousands of packages that contain the variable named x. Of course, that happens if the above code is in a function (or does it?).
What concept of R is at work in this dichotomy?
AKSHAY M KULKARNI
[[alternative HTML version deleted]]
More information about the R-help