ENiRG-package: Ecological Niche in R-Grass

Description Details Note Author(s) References See Also


ENiRG has been designed to characterize the realized niche of the species by interfacing R software with GRASS geographical information system in order to overcome issues when working with large data sets (i.e., wide areas or high resolution). This package uses classes defined in rgrass7 package to deal with spatial data and to interface R and Grass.


Package: ENiRG
Type: Package
Version: 1.0-1
Date: 2016-05-03
License: GPL (>=2)

This package is organised in four main parts:

ENiRG is able to perform the analysis into GRASS, by intitiating a session within R (see also function initGRASS from rgrass7). ENiRG provides an easy way to import raster maps through import.egvs, containing EGV's distribution in any of the formats supported by GDAL library (gdal.org). It also provides several functions to explore GRASS environment, giving the available list of maps (list.maps) and metadata (map.info). Before run ENFA analysis, standardization of quantitative EGVs is suggested Hirzel et al. (2002). stdz.maps allows the process by retrieving its univariate statistics.

Characterization of the species's niche can be done by using the main function of the package. enirg performs ENFA analysis, while projection of the ordination diagram of marginality and specialization (ENFA's principal components), can be computed using enirg.plot.

Function enirg.predict focuses on computing the prediction of the species' niche accordingly with ENFA's results.

Main functions of the package offer two methods, accordingly to the amount of data computed. User can choose one of two available methods: "normal" and "large". The first, strongly relies on the rgrass7 package and thus is limited by R storage capacity and computations; on the contrary, "large" method directly interface with GRASS, allowing calculations over large areas or high resolution maps with huge amount of data (NOTE: it is only available for Linux/Unix OS, at the moment).

boyce function aims to investigate how accurately the map obtained from function enirg.predict is predicting modelled species presences (Boyce et al., 2002). Intervals estimated manually, allow users to reclassify predicted niche maps, by using classify.map, and thus distinguishing unsuitable, marginal, suitable and optimal habitat (Hirzel et al., 2006). Evaluation of habitat suitability model accuracy is made by means of n-fold cross-validation (Fielding and Bell, 1997).

User can take advantages of integration with other R libraries (raster, rasterVIS), portability and interoperability within GRASS (i.e. efficient map storage) and can also communicate with other commonly used GIS software, such as QGIS.

A graphical user interface (GUI) allows better access to functionalities of ENiRG package through function link{enirg.GUI}.


The package depends on rgrass7, raster, R.utils, stats, gplots, miniGUI, ade4, tcltk2, fgui.


Fernando Canovas, Chiara Magliozzi, Jose Antonio Palazon-Ferrando, Frederico Mestre, Mercedes Gonzalez-Wanguemert

Maintainer: Fernando Garcia Canovas fcgarcia@ualg.pt


Boyce, M.S.,Vernier, P.R.,Nielsen,S.E.,Schmiegelow, F.K.A. (2002). Evaluating resource selection functions. Ecological Modelling 157, 281-300.

Fielding, A., Bell, J. (1997). A review of methods for the assessment of prediction errors in conservation presence/absence models. Environmental Conservation, 24, 38-49.

Hirzel, A.H., Hausser, J., Chessel, D. and Perrin, N. (2002). Ecological-niche factor analysis: How to compute habitat-suitability maps without absence data? Ecology, 83, 2027-2036.

Hirzel, A.H., Le Lay, G., Helfer, V., Randin, C., Guisan, A. (2006). Evaluating the ability of the habitat suitability models to predict species presences. Ecological Modelling 199, 142-152.

Canovas, F., Magliozzi, C., Mestre, F., Palazon-Ferrando, J.A. and Gonzalez-Wanguemert, M. (2016). ENiRG: R-GRASS interface for efficiently characterizing the ecological niche of species and predicting habitat suitability. Ecography 39: 593-598.

See Also


ENiRG documentation built on May 1, 2019, 9:15 p.m.