R complaints

I’ve recently read a number of complaints about the R programming language and thought I’d pull together the complaints into one place.

  • Inconsistent return types, list/vector confusion (Andrew Gelman)
    I always get mixed up about when to use [] and [[]].
  • Lack of useful types (Andrew Gelman)
    HavingĀ  nonnegative or [0,1) constrained floating point types would be quite useful in many circumstances. I haven’t used factors enough to know if they would work in most scenarios where an enumerated type is used in other languages. Having built in random variable types would be useful too.
  • Scalability and S4 complexity issues, mixed with R coding style issues (Andrew Gelman)
    I haven’t used S4, so I can’t comment on that. However, I have found it very useful to be able to type the name of a function on the command line and see it’s code directly. Unfortunately, built-in functions (e.g. lapply) don’t print out (probably because they really only exist in C code). It would be nice for such functions to print out an equivalent R implementation with a note saying that it really executes in C.
  • Vector indexing issues #1, #2, #2a, #3 (Radford Neal)
    As a CS guy I find 1-based vectors hard to justify, but Radford notes a number of other issues. I’ve been bitten by the automatic dimension dropping “feature” rather frequently.

Category: Uncategorized Comment »

Leave a Reply

Back to top