Love it and hate it, R has come of age

Seeing a long, lavish article about R in the NEW YORK TIMES (!) really freaks me out.

replicate(100,  c(
  "OMG OMG, R is now famous?!",
  "People used to make fun of me for learning R since Splus is SO OLD!",
  "I still hear stories that SAS can do crazy tricks that make me jealous.
  But not enough to attempt learning it."
)[ floor(runif(1, min=1,max=4)) ] )

This blog has been a long-time supporter of this both brilliant and insanely quirky statistical programming environment. Here are some graphs I’ve made in the last year or two that have R code attached:

Learning R is hard because there’s a zillion packages, and the official documentation is reference-oriented.  I’ve never looked at any of the books much.  I think you can get very far with exactly two websites:

  • Quick-R – the best introduction that’s organized by topic, not overly domain-specific, and not overly biased towards the author’s pet package.  Check out the “Advanced Graphics” section for a good time.
  • RSeek.org – searches the documentation, package listings, and most critically, the archives of the amazing user mailing list.  Searching those archives alone is far more useful than any half-assed attempt at documentation — it records the expertise and advice of hundreds of statisticians solving real problems over the last 10 years.  I’ve stumbled upon entire new areas of statistics just by reading the R-help archives.

For a few lucid demonstrations of R’s flaws, see these interesting Radford Neal posts: (1) (2) (3) .  It has way more problems than these, of course.  The core’s development model is too closed-source-y.  There’s horrible repetition and inconsistencies even in the standard library.  I swear I’ve seen its interpreter be even slower then Ruby.  You have to memorize a zillion incomprehensible 3-letter-acronyms when making a final draft plot.

But yet it is still great.  R takes one problem — programmatic single-machine data analysis — and solves it well, using a nice Scheme-like language, plus an impressive user community to boot.

This entry was posted in Uncategorized. Bookmark the permalink.

6 Responses to Love it and hate it, R has come of age

  1. John says:

    It’s great to read a “warts and all” review of R. I’ve used dozens of programming languages, and R has been the hardest for me to learn. But it’s a good tool for what it does well.

    I think that part of the problem with R is that many R users only know (or only use) R. They learn it in school and then use it for every task, whether it’s appropriate or not. And since they have nothing to compare it to, they assume the inconsistencies, cryptic names, and so forth are normal. Then when they start to write modules, they write like what they’re used to. I imagine the best R programmers learned to program somewhere else and then started using R.

  2. brendano says:

    Hm, interesting. Some Risms I just can’t take after knowing normal programming languages — like using dots instead of underscores as separators in variable names.

  3. When is a matrix not a matrix? When it’s a matrix in R that you neglected to include the “drop=N” argument.

    I confess to a love-hate relationship with R. It makes hard things easy and easy things hard. Beautiful visualizations of kernel density plots: easy peasy. Straightforward means of working with lists: good luck with that.

    Inconsistent syntax. Incomplete documentation. But a vibrant community and still better than anything else I’ve come across.

  4. brendano says:

    “R makes hard things easy and easy things hard” => I love it.

    (For anyone who doesn’t recognize the reference, it’s to Larry Wall’s design goal for Perl: “Easy things should be easy and hard things should be possible.” Or at least that’s what I recognize.)

  5. Pingback: » Tweets for 2009-04-26 (Dhananjay Nene)

  6. ScottS-M says:

    Wouldn’t
    sample(c(
    "OMG OMG, R is now famous?!",
    "People used to make fun of me for learning R since Splus is SO OLD!",
    "I still hear stories that SAS can do crazy tricks that make me jealous.
    But not enough to attempt learning it."
    ),100,TRUE)

    be more R-like? :) Nice article.