R is a powerful open source environment for statistical computing. This post provides a selective list of resources for getting started with R including thoughts on books, online manuals, blogs, videos, user interfaces, and more. At the end of the post are some R resources specific to researchers in psychology. (UPDATED 4th May 2011)
Getting Started
Download and Install R
- R runs on Windows (see this FAQ for Windows), Mac, and Linux
- It can be downloaded for free from the official R website
Watch Videos on R:
- I wrote a post with links to 100s of videos on R organised around topics of "What is R", "Introduction to R", and "Advanced R".
Organise a user interface to R.
- I recommend R Studio.
- You may also want to look at R commander at first. It provides an SPSS-style menu driven interface which can be useful when first getting started.
- There are many other options, including Emacs with ESS, vim, and StatET and Eclipse.
- See this discussion on StackOverflow for more ideas
Read some free online documentation
- Introduction to R by Venables, Smith, and R Core
- List of free online documentation on R
- Quick-R: A fantastic resource to quickly check how to complete common analyses. This is particularly suited to researchers transitioning to R from tools such as SPSS or SAS.
Memorise important R commands
- Tom Short's R Reference Card: This concise list of commands is great; print it out and work through the commands.
- R Abbreviations explained: R uses many short commands; this post explains their meaning in order to assist with recall
Stay up to date on R News:
- Subscribe to the RSS feed of R-Bloggers: It syndicates many, if not most, of the R related posts in the blogosphere.
- If alternatively you want to follow fewer posts, David Smith tends to post important R news and links to noteworthy blog posts by others.
- R Journal, formerly called "R News", publishes R related articles.
Know how to find answers to your questions
- Learn how to use built-in documentation (e.g.,
help
,?
,apropos
,help.search
, etc.) - Google is still good (despite the many meanings of the letter "R"). I generally just use it
- Rseek is an R specific search engine
- Learn how to use built-in documentation (e.g.,
Know where to ask questions to the R community:
- R Tag on StackOverflow: A good option for anything related to programming in R.
- Cross Validated: This is part of the Stack Exchange network. This is a good option if the question concerns statistical elements of R.
- R Help Mailing List: Another option for asking R related questions with many R gurus in attendance.
- With all these forums a good question will typically be answered within a day.
Learn about additional R packages
- Base R often does most of what you want, but there are thousands of user contributed packages.
- R Task Views organises the many R packages into various topics.
lattice
,ggplot2
,plyr
,nlme
are some general packages relevant to a lot of people.
Get some good books (free or paid):
- The question of good books on R was asked on Stack Overflow. In particular, this answer lists several good free online options.
- The R website lists many of the increasing number books on R that are being released.
- Some of the books on R that I have enjoyed reading include the
following:
- Software for Data Analysis (2008): John Chambers: This gives a sense of the philosophy and style of programming in R. It is an intermediate to advanced text.
- Data Manipulation with R: Phil Spector: This book is short, concise, and very clear. The examples are well chosen.
- Data Analysis and Graphics Using R - An Example-Based Approach: John Maindonald and John Braun: This provides a good introduction to R. It also covers many techniques useful in psychology introducing several interesting techniques that are not necessarily part of the standard psychology statistics curriculum.
- Books in the ;The Springer UseR Series tend be quite good.
- But there are many more.
Engage with the R community
- Join Twitter and check out the #rstats hashtag to find others interested in R
- See the Reddit Statistics community for occasional R links.
- See if there is an R Users Group near you (Directory of R User groups).
- Consider attending the useR conference
- Consider starting a blog and syndicating your content to R-Bloggers
- Participate in one of the previously mentioned question and answer sites
- Consider sharing your code on a site like github or eventually writing an R package and contributing it to CRAN.
Additional Resources
The following are some additional R web resources that I have liked over the while.
- Dolph Schluter's R Tips: Nice set of tips on R (particularly see "fit models" section)
- R in a few hours
- UCLA Short Courses on R: includes notes on moving from SPSS/Stata/SAS to R
- Michael Lavine: Introduction to Statistical Thought: Higher mathematical level; uses R to illustrate principles of probability, inference, modelling, etc.
- Delicious: Lists new R resources
- Cyclismo R Tutorial: Gives an introduction to basic statistics with R
- R Primer: A book introducing R and a little bit of statistics by Christopher Green
- Ecological Models and Data in R: Benjamin Bolker: An early draft of the book is available online. The book provides an introduction to model building for ecologists, but should also be relevant to researchers in psychology. It provides a fairly gentle introduction to statistical modelling.
- Shravan Vasishth and Michael Broe ;have an online book on simulations and statistics useful for social scientists.
- Dan Wright's Psych 101 course with R, SPSS, and Excel
- SimpleR: A free online earlier version of what later went on to become a book. ;It introduces R and basic statistics.
- Ashworth R Resources: A course on R with Lecture notes, datasets, and tutorials. I particularly liked the material on the general linear model.
Psychology Specific R Resources
Task Views particularly relevant to psychology
- William Revelle's Psychology R
Site ;also see the package
;
pscyh
, ;and the ;online book and workshop resources - Learning Statistics with R is a textbook written to teach undergraduate statistics in psychology using R Jo nathan Baron and Yelin Li's R for Psychology Experiments
- Drew Conway suggests a list of must have R packages for the social scientsist
- SEM in R
- Mailing list for Psychology and R
- Edinburgh Psychology R-users
- Jason Locklin's notes on standard experimental analyses in psychology
- Posts on this website with the R tag
- My blog has over 50 posts on R often with a focus on how R applies to psychology research; click here to subscribe to the RSS feed.