4 ms·
The first article is incorrect in saying that "user_info" will not behave as you'd expect. (I guess the author didn't try it out?) There are definitely some dee
by util 16y ago
The first article is incorrect in saying that "user_info" will not behave as you'd expect. (I guess the author didn't try it out?) There are definitely some deeper issues, but it seems wrong to call out something as not being programmed by a "programmer" based on syntax. (Underscore (drawn as arrow) is shared by Squeak Smalltalk, at least.)
The second article probably would've done better to use
m <- matrix(1:6, nrow=2)
and
m <- matrix(1:6, nrow=2, byrow=TRUE)
as examples. Maybe matrices and arrays are implemented as contiguous ranges of memory underneath -- vectors -- but the language/standard library has plenty of functions dealing with them at a higher level, and you can live entirely within the abstraction if you like (although you may pay a price in speed, especially when constructing the initial structure). ("array" does not take a "by.row" argument.)
I guess I agree with the overall sentiment, but I find most languages to be lousy for one reason or another. (Python certainly has some warts, some in common with R -- lack of consistent naming conventions in the standard library for one.) The vector-oriented functions, convenient syntax for regression, the large library of stat functions, the packages, etc., make the pain worth it. And if R is from non-programmers, wait till you see SAS.