Duke Wiki  logo
Page tree
Skip to end of metadata
Go to start of metadata


Advice for Learning R


R is the predominant statistical package in ecological and evolutionary research, and there are good reasons for is prominence - it is extremely powerful, very flexible and adaptable to most any statistical need, and there is a huge user community in which individuals are eager to share their knowledge. In the context of comparative biology, R is the primary area of methods development.


If you want to join the R revolution, however, it is hard to know where to start. R is challenging in a "bad" way at first, and then it becomes challenging in a "good" way, meaning that working through the analysis actually becomes fun, similar to the enjoyment of solving a puzzle or playing a game. Here, I share some of the steps that helped me transition from frustration to fun.


The first thing I'd recommend is to purchase a few books. Two that I've found useful are Dalgaard (2008) and Bolker (2008), but there are many good introductions available, and so pick a few that seem to best fit your needs.


Once you have some books and download R, I strongly recommend making a bold move - remove all statistics packages from your computer except for R. Also, make a promise that you'll create your figures in R. There is no way to learn R unless you struggle with it a bit, and you won't struggle with it if you have more familiar options at hand. 


Get on some R listservs. Start to look over the questions and replies on the listserv, and get to know the main packages. An excellent listserv for phylogenetics is R-sig-phylo.


If you use MATLAB, you may find this MATLAB/R translation table very helpful. Or, check out the R Reference Card, which I keep prominently on the desktop of my computer and find incredibly useful for a quick solution to designing analyses.


Finally, a variety of wikis and websites - in addition to this one - provide advice on running phylogenetic analyses in R. Check out, for example, the R-phylo wiki, or the wiki associated with the Bodega Bay Workshop for Applied Phylogenetics. Brian O'Meara has produced a great CRAN Task View on Phylogenetics, Especially Comparative Methods. Or better yet, consider taking the Bodega workshop, or the one that I run - the AnthroTree Workshop. The wikis for my previous workshops are available online: 20102011.


To get you started, in Section 1.1.3 we introduce R and a few basic techniques that will be necessary for completing the tutorials on this website. However, you are strongly encouraged to make use of the many other resources available for getting started with R. Simply Googling "R for beginners" will bring up dozens of excellent introductions.


Have fun! And once you get a firm hold on the learning curve, you'll never bother to reinstall those old programs. It really is worth the effort! And it's fun, too!



Bolker BM. 2008. Ecological models and data in R. Princeton University Press.

Dalgaard P. 2008. Introductory statistics with R. Springer Verlag.

R Development Core Team (2010). R: A language and environment for statistical computing. R Foundation for
Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, URL http://www.R-project.org.



Contributed by Charlie Nunn

  • No labels