Skip to content


Functional diversity
Here you can get code and instruction on how to calculate FD, the measure of functional diversity that Owen and Kevin Gaston created.

Food webs
Here you can get code to model and analyse food webs.

RefWeb 0.9
Here you can get code and instructions that draws a web of papers and joins them according to who cites whom.

Download the code and example data files for all of the above from here.

Why R?
All the code above is written for R. We really can’t recommend it highly enough. Virtually every type of ecological analysis is already available in the main distribution of R and/or the extra packages). R’s default graphics are of publication quality (and easily edited). Its free, will run on virtually any platform (e.g., Windows, Linux, Macs), and seems to be significantly faster than many other languages/environments. The only apparent down side is the steep learning curve. However, little steps easily tackle steep slopes; the effort will be rewarded.

None of this code comes with any guarantee. In fact its all pretty dirty and not optimised. Please contact Owen if you have suggestions or possible corrections.