There are a bunch of odd non-standard syntax choices in this tutorial. For example, the author ends statements with semicolons. R does allow equal sign assignment (although style guides prefer the stupid arrow syntax). The author mentions Bioconductorm the... second biggest package repository for the language?
I clicked because I was a programmer for 15 years before I used R, and I have subsequently developed and shipped R packages, so I feel like I'm in a pretty good position to get the visceral, cathartic, "argh" the writer here was going for.
the "stupid arrow syntax" is not nearly so stupid, and I speak here as a 10+ year Python developer, as the misuse of the equal sign that every C-style language seems to think is ok. The = sign meant something long before computer programming, and it is something the developer community ought to be ashamed of that it is being used for "change this thing to that". /rant
Well, the "=" operator is eas to type since it's on pretty much every keyboard and probably has been for ever. And it's faster than typing a two-symbol operator like := or <- so.
If you want "=" to (more or less) mean what it used to mean "long before computer programming", try Prolog.
?- a = a.
true.
?- a = b.
false.
?- A = a.
A = a.
?- A = a, A = b.
false.
?- A = a, A = B.
A = B, B = a.
?- A == B.
false.
?- A = B, A == B.
A = B.
Nice? Most programmers would pull their hair from the root at all this :)
(hint: "=" is not assignment, neither is it equality and "==" is just a stricter version thereof).
I would willingly put up with the stupid arrow syntax if I could use ← for it, and with the gratuitously confusing to people coming from other languages use of [[ ]] for an element of a list rather than a sublist if I could use ⟦ ⟧.
R was originally not much more than a bunch of Scheme macros if I understand the history right. Suspect <- may have just been an infix macro for define at one point.
Of course I probably would have preferred just keeping the lispy syntax of scheme without all the infix stuff!
I clicked because I was a programmer for 15 years before I used R, and I have subsequently developed and shipped R packages, so I feel like I'm in a pretty good position to get the visceral, cathartic, "argh" the writer here was going for.