2 ms·
One thing I'd add to the section on "Coming from another language" [0] is a brief introduction to non-standard-evaluation. Hadley Wickham's Advanced R (free to
by danso 11y ago
One thing I'd add to the section on "Coming from another language" [0] is a brief introduction to non-standard-evaluation. Hadley Wickham's Advanced R (free to read on the Web) has a nice section on it:
http://adv-r.had.co.nz/Computing-on-the-language.html http://adv-r.had.co.nz/Computing-on-the-language.html
NSE is what allows these two statements to both work:
library('ggplot2')
and:
library(ggplot2)
It's a relatively minor thing but it helps to explain some of the "magic" (Wickham's chapter opens with an example of how `plot()` magically knows what to label the axes) of R and might explain some of the baffling inconsistencies you might find in code out in the wild.
[0] http://www.burns-stat.com/documents/tutorials/impatient-r/r-coming-programming-languages/ http://www.burns-stat.com/documents/tutorials/impatient-r/r-...
- emmelaich 11y agoThat's a nice feature. Some languages are very prickly and have uninformative messages when you try the equivalent of one of these. Python has a similar-ish feature for help(): >>> import os >>> help(os) >>> help('os')