Paleolimnology and multivariate statistics: some examples using the R statistical language

PALS workshop

Daniel Borcard

May 27, 2011

Many thanks to Pierre Legendre for substantial parts of this page


Last updated: 30 May 2011, 13:10


The workshop will consist in two parts:


Installing R on your computer

Participants must install R and several of its additional packages before the workshop.

Go to the CRAN web site. You may choose to go to one of the mirror computers of CRAN.

In the section Download and install R, choose your platform (Windows, Mac OSX, Linux) and follow the instructions. The current version is R 2.13.0 (but the last number may change).

On MacOS 10.5 and more, download R-2.13.0.pkg. Owners of older computers (running under MacOS 10.4) may download version R.2.10 by clicking on the "universal" link of section "Subdirectories", and from there by navigating to the "base" folder.

Windows users: go to folder "base" of the Windows page, and click on the "Download R.2.13.0 for Windows" link. While installing R with the R-2.13.0-win.exe executable, if you want the graphics windows to be independent of the main R console click « Yes » to Customize the startup options, then click « SDI (separate windows) » for Display Mode.

Apart from the basic R installation, for the workshop you need to install several additional packages.

Some of them (see list below) are available from the CRAN web site. For these, choose one of the two methods below:

Three other packages will be needed, but their installation is different. The the AEM, packfor and PCNM packages must be downloaded from the R-Forge web site. Do not decompress these files; keep them as .zip (Windows) or .tgz (MacOS X). To install these packages into R from your hard disk:

R is a self-learning environment. Manuals are available in section Documentation => Manuals => Contributed documentation of the R web site, including the guide R for Beginners written by Emmanuel Paradis (Université Montpellier II). The internal documentation of R is in English.


Text editors

R is based on command lines. When working with R, it is best to first write the commands in a text file and then to transfer them into the R console. I advise you to install at least one of the text editors suggested below on your computer if you don't already have one. Complex word processors like MS Word should be avoided because they introduce lots of hidden control characters which produce unpredictable results when unwillingly transferred into R. Here are somme suggestions of free text editors that work well with R:


Introduction and practicals in R by Pierre Legendre and Daniel Borcard

Zipped folder containing a text and R script as well as data files. To make things easy, unzip this folder on your computer and, in R, declare it as your working directory.

Participants, especially those who have no experience in R and/or in multivariate analysis, are strongly advised to read the introduction and run the exercises before the workshop.


NEW AND IMPORTANT: new script and data for the workshop

Zipped folder, UPDATED VERSION 26 May 16:45, containing an R script and paleolimnological data. These two files must be unzipped and placed in the same folder as the preceding material. This new script contains the advanced part of the workshop, dealing with two approaches for chronological study of fossil diatom data.


Important documents

PDF version of the PowerPoint presentation by D. Borcard (1st hour of workshop).

Key reprints

Variation partitioning:

Forward selection of environmental variables

PCNM, MEM and AEM analysis:


To those interested...

New book: Numerical Ecology with R


Main PALS web page