Hello everyone again,
I much appreciated the explanations.
On Wed, Sep 25, 2019 at 11:02:42AM +0200, Francesco Ariis wrote:
> Maybe the Introduction should link to it (or similar page) with text
> "In case you are interest in the difference between static and lexical
> scope, check this explan
I didn't say R's rules were "a mystery" or "overly complicated", but
that they are "weird".
When I started trying to compile R, with() did not exist, if I
remember correctly.
Half the point of compiling is to do variable lookups at compile time.
In an example like
function (...) {
use x
I found this confusing until I learned about environments. The current state of
the environment that was active at the time the function was defined is
searched, not a frozen copy of the enclosing environment as it existed at the
time the function was defined.
x <- 1 # as it was when f was crea
On 26/09/2019 12:14 p.m., William Michels wrote:
The best summary I've read on the subject of R's scoping rules (in
particular how they compare to scoping rules in S-PLUS) is Dr. John
Fox's "Frames, Environments, and Scope in R and S-PLUS", written as an
Appendix to the first edition of his book,
The best summary I've read on the subject of R's scoping rules (in
particular how they compare to scoping rules in S-PLUS) is Dr. John
Fox's "Frames, Environments, and Scope in R and S-PLUS", written as an
Appendix to the first edition of his book, An R and S-PLUS Companion
to Applied Regression (2
On 26/09/2019 9:44 a.m., Richard O'Keefe wrote:
Actually, R's scope rules are seriously weird.
I set out to write an R compiler, wow, >20 years ago.
Figured out how to handle optional and keyword parameters efficiently,
figured out a lot of other things, but choked on the scope rules.
Consider
Actually, R's scope rules are seriously weird.
I set out to write an R compiler, wow, >20 years ago.
Figured out how to handle optional and keyword parameters efficiently,
figured out a lot of other things, but choked on the scope rules.
Consider
> x <- 1
> f <- function () {
+ a <- x
+ x <- 2
On Wed, 25 Sep 2019 at 11:03, Francesco Ariis wrote:
>
> Dear R users/developers,
> while ploughing through "An Introduction to R" [1], I found the
> expression "static scope" (in contraposition to "lexical scope").
>
> I was a bit puzzled by the difference (since e.g. Wikipedia conflates the
> tw
Dear R users/developers,
while ploughing through "An Introduction to R" [1], I found the
expression "static scope" (in contraposition to "lexical scope").
I was a bit puzzled by the difference (since e.g. Wikipedia conflates the
two) until I found this document [2].
Maybe the Introduction should
9 matches
Mail list logo