R is an open source statistical programming language which has built in functions for performing basic and advanced statistical analysis. R's open source library of contributed packages on CRAN makes it a popular choice for distributing code to other users. While looping with interpreted R code may be slow, there is an R compiler or the ability to call C, C++ and FORTRAN to provide substantial speedups. Students will use R in many classes as well as frequently in research. Below are a few resources to introduce students to the R environment and programming language as well as some example code. Within R, using the help(functionname) or ?functionname commands will load the R documentation for functionname. Emacs has a mode for editing R code which is extremely convenient for editing code, functions and running R from within emacs.
- R Tutorial provides a brief introduction to R for students unfamiliar with R
- R Project Site: The R Project's homepage with Documentation, Downloading R, FAQs, more (subset given below)
- An Introduction to R (the most up-to-date version of the Intro notes)
- R CRAN site (downloads, documentation, and more)
- FAQs (please read before posting a question!)
- Packages (contributed packages for R)
- R reference card [pdf (59k, 1 pg)] (J Baron)
- Writing R extensions [pdf (425k; 69 pgs)] (Explanations of writing packages and calling C from R)
- ESS (Emacs Speaks Statistics) Emacs interface to R with ESS Reference Card (pdf)
- Using R for data analysis and graphics [pdf (693k; 112 pgs)] (JH Maindonald)
Example Code - Example R code of a very basic Gibbs sampler. Provides examples of how to read data from a file, write data to a file, and plotting figures. See the code explanation for more background information about the code
- WN Venables, DM Smith and the R Development Core Team (2004) An introduction to R. [Amazon ]
- P Dalgaard (2002) Introductory Statistics with R, Springer-Verlag, New York
- WN Venables and BD Ripley (2002) Modern Applied Statistics with S, 4th edition. Springer-Verlag, New York. [Online complements]
- WN Venables and BD Ripley (2000) S Programming. Springer-Verlag, New York.
- JM Chambers (1998) Programming with Data : A Guide to the S Language. Springer-Verlag, New York.
- JM Chambers and TJ Hastie (eds) (1991) Statistical Models in S. Chapman & Hall, New York.
- The R Primer - a book by Chris Green taken from his website.