Monday, October 18, 2010

My Favorite Online R References

I don't by any means claim to be a great and efficient R programmer, but it is certainly something that I aspire to be. The most important thing I've found is that I don't have to use a lot of brain power trying to remember every R command created. I just have to remember that there are R commands that have the ability to do things I want, and then it just takes a moment or two to look up what I want.

From time to time I think I'll post some of my favorite functions on here that I always seem to forget about that make life easier. For example the "which" function, which can often be replaced by using brackets in a clever manner, but can be invaluable in other instances. Another is the "match" function, which is great when you have, say, a sub list of rownames from a full list that you want to do something with. Another interesting function that was useful last week was the "jitter" function, which adds a specified amount of random error elements in a vector

Some of my favorite online references are listed below. When I want to know how to do something in R, before searching through google, I'll often check these out first:

Quick R
A great site which has examples of using R for many different types of statistical analyses

A great collection of graphs and plots

Some basic plotting examples

I haven't explored this site as much, but it has some nice things

When I find myself googling for specific examples it often results in searching through the R mailing lists archive. More likely than not it'll take a few rewordings of my question before I find exactly what I want. And I somehow have overlooked the obvious help files in R found by typing in ?function, as well as the great manuals found on the The Comprehensive R Archive Network


  1. I was hoping this post would be only one sentence to match your efficiency as a programmer. Regardless, a very good post.

  2. don't be crazy you are a great and efficient R programmer!

  3. I suppose I could rewrite it as one sentence:

    R resource = ask Alan.


    Maybe you can get yourself in the aggregation.

    while redundant, make for good modern QA sites.

  5. This is pretty nice too; if anyone would ever contribute all the R ways to do things.