Free Tools | R package 'ecospat' | MigClim | Niche overlap | Biomapper | Canogen

Free Tools

You will find here the tools our GIS lab and research group make available to the scientific community.


R package 'ecospat'

Miscellaneous methods and utilities for spatial ecology analysis, written by current and former members and collaborators of the ecospat group. The ecospat package offers the possibility to perform Pre-modelling Analysis, such as Spatial autocorrelation analysis, MESS (Multivariate Environmental Similarity Surfaces) analyses, Phylogenetic diversity Measures, Biotic Interactions. It also provides functions to complement biomod2 in preparing the data, calibrating and evaluating (e.g. boyce index) and projecting the models. Complementary analysis based on model predictions (e.g. co- occurrences analyses) are also provided. In addition, the ecospat package includes Niche Quantification and Overlap functions that were used in Broennimann et al. 2012 and Petitpierre et al. 2012 to quantify climatic niche shifts between the native and invaded ranges of invasive species.


You can install the ecospat package in R from CRAN or GitHub. CRAN provides the most stable version. GitHub provides the most updated functions but not fully tested yet. Check out the latest updates available on GitHub.

1) installation from CRAN in the R console:

> install.packages("ecospat")

> library(ecospat)

The package is currently removed from the main CRAN repository while awaiting updates. We apologize for that! You can however install ecospat using the archived file ecospat_2.1.1.tar.gz  

> install.packages("C:/<path to the dowloaded file>/ecospat_2.1.1.tar.gz", repos = NULL, type = "source")

2) installation from GitHub in the R console:

> install.packages("devtools")

> library(devtools)

> install_github("vdicolab/ecospat/ecospat")

> library(ecospat)


Examples of how to use the functions:



MigClim is an R package which allows simulating plant dispersal under climate change and landscape fragmentation scenarios. MigClim allows implementing various parameters, such as dispersal distance, increase in reproductive potential over time, landscape fragmentation or long-distance dispersal.

Link on CRAN

Reference :

Engler R. and Guisan A., 2009. MIGCLIM: Predicting plant distribution and dispersal in a changing climate. Diversity and Distribution, 15 (4), 590-601.

Engler R., Randin C.F., Vittoz P., Czáka T., Beniston M., Zimmermann N.E., Guisan A., 2009. Predicting future distributions of mountain plants under climate change: does dispersal capacity matter? Ecography, 32 (1), 34-45.

Engler R., Hordijk W., Guisan A., 2012. The MIGCLIM R package – seamless integration of dispersal constraints into projections of species distribution models. Ecography, 35 (10), 872–878.

...and don't miss out the presentation video of Migclim featuring Robin Engler at the Global Online Seminar in Biodiversity Informatics help by A. Townsend Peterson at the University of Kansas: Youtube link



Niche overlap

The R package 'ecospat' R now includes the functions to perform measures of niche overlap and niche equivalency/similarity tests.

Short tutorial:

Create a folder with a R shortcut. Use this folder as workspace by setting the path in the proprieties of the shortcut (right click). In this folder also put your datasets of occurences data (delimited text file with column names x,y) and datesets of points representing the study areas with environmental values (column names should be x,y,X1,X2,...,Xn).

The user scripts allow setting the analyses for the calculations with an example data. Use user_script_2sp_2A.R if you want to compare niches of 2 species in different areas (e.g. invasive species). Use user_script_Nsp_1A.R if you want to compare niches of n species in the same area.

If you encounter a problem during your analyses, please read this FAQ

user scripts:

user_script_2sp_2A.R , user_script_Nsp_1A.R

Species & climate example data:,, CM_2009_05feb.txt, sp.txt, sampleglob.txt


Broennimann O. , Fitzpatrick M.C. , Pearman P.B. , Petitpierre B. , Pellissier L. , Yoccoz N.G. , Thuiller W. , Fortin M.J. , Randin C.R. , Zimmermann N.E. , Graham C.H. , Guisan A. 2012. Measuring ecological niche overlap from occurrence and spatial environmental dataGlobal Ecology and Biogeography 21(4): 481-497. DOI



Link to the BIOMAPPER software for predicting species occurrences developped by Alex Hirzel at UNIL.



Get the zip CANOGEN AML developped by Andrew D. Weiss and Stuart B. Weiss to predict plant distribution in ARCINFO directly from CANOCO outputs (see Guisan, A., Weiss, S.B. & Weiss, A.D. 1999. GLM versus CCA spatial modeling of plant species distribution. Plant Ecology 143(1) : 107-122)

Credits : Thanks to acknowledge Andy and Stu in any related publication ! Contact weiss.andrew (a)  (4 Ko)


Biophore - CH-1015 Lausanne
Tel. +41 21 692 41 60
Fax +41 21 692 41 65