Dept. of Computer Science
University of California at Davis
Davis, CA 95616
R is a wonderful programming language for statistics and data management, used widely in industry, business, government, medicine and so on. And it's free, an open source product. The S language, of which R is essentially an open source version, won the ACM Software System Award in 1998.
Downloading R:
R is available for Linux, Windows and Mac systems.You can download R from its home page.
For Ubuntu Linux or other Debian-related OSs, a more direct method is:
% sudo apt-get install r-base
Learning R:
There is a perception among some that R has a steep learning curve, but I disagree. True, R usage has its advanced aspects, but my recommendation is simply, just get started! Start simple, and then refine gradually.I'll list a few tutorials below (not necessarily the best, just ones I know of). But first, I wish to make a very important point:
"When in doubt, try it out!" That's a slogan I invented to illustrate the point that R's interactive mode allows you to try your own little experiments, the best way to learn. Keep this in mind when you go through the tutorials listed below and in Google.Here are some resources that I would recommend for learning R:
- For Non-Geeks:
There are numerous gentle online tutorials on R,
such as:
- This one at Potsdam University.
- A gentle R tutorial from the famous O'Reilly book series.
- Just plug "R tutorial" into Google to see many more.
- For (Actual or Aspiring) Geeks:
R syntax is similar to those of C, Python, PERL, etc.
don't know these terms) object-oriented and has a
functional programming philosophy. Here are some introductions to R
from a programming perspective:
- Of course, I'll mention my own tutorials on writing R code
(though very little on the statistical aspects):
- My 5-minute tutorial on R programming for those who know C.
- Chapter 1 of my book on R software development, The Art of R Programming, NSP, 2011. This gives you an overview of the language, and walks you through a couple 5-minute R sessions.
- Part of a very rough draft of that book. It is only about 50% complete, has various errors, and presents a number of topics differently from the final version, but should be useful.
- The R programming Wiki.
- Of course, I'll mention my own tutorials on writing R code
(though very little on the statistical aspects):
- Many books are listed on the R home page.
Advanced R:
- parallel R:
R Programming Tools:
One of the most debated topics in R online discussions is that of programming tools for R, of which there are many.- I'm not a fan of integrated development environments, but if you
like IDEs, there are a number of open source products available:
- The most popular is undoubtedly RStudio, RStudio, introduced in 2011, and growing rapidly in functionality.
- For fans of the Eclipse framework, StatET is available, and includes a debugging tool.
- More established products include JGR, Rcmdr, RKWard.
- There are a number of plugins for text editors such as Emacs (for which a debugger is available), Vim, gedit, and so on.
- In the commercial realm, there is one from Revolution Analytics , which also includes a debugging tool.
People you can talk to:
- There are various mailing lists (start with R-help) shown on the R home page.
- There are R user groups in cities around the world. I'm active in the the San Francisco Bay Area group. We hold meetings once a month, with one or two speakers. Many attendees are new to R.
- Another online place to ask questions is Stack Overflow.