3 ms·
I've used R for some data visualization in the past, but I'm not sure I was fully aware how R scopes work. The spreadsheet datatype is inspired by dataframes th
by middayc 3y ago
I've used R for some data visualization in the past, but I'm not sure I was fully aware how R scopes work. The spreadsheet datatype is inspired by dataframes that I first saw in R though.
One difference with Rebol around scopes is that setwords only set values in current context. A function (or any other context) can't change anything outside directly, and also not in subcontext, so there is not context/word: "value".
You can only call functions in sub or parent contexts.
There are few functions that change words in-place and all end with !, they accept lit-word (in Rebol terms) that they should change in place. So this word is seeked in same manner as in general words are, also through parents, but it's very visible and explicit.
- bradrn 3y ago> I've used R for some data visualization in the past, but I'm not sure I was fully aware how R scopes work. You might be interested in this description, then: https://adv-r.hadley.nz/environments.html https://adv-r.hadley.nz/environments.html