enirg.predict: Predicting species' suitable habitat

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

enirg.predict computes habitat suitability maps (HSM) using the Ecological Niche Factor Analysis (see enirg), and Mahalanobis distances method.

Usage

1
2
3
enirg.predict(enirg.results, qtegv.maps = NULL, qlegv.maps = NULL,
              load.map = FALSE, method = "normal",
              prediction.name = "predicted")

Arguments

enirg.results

object of class enirg

qtegv.maps

vector giving names of quantitative environmental variables raster maps. If set to NULL, automatically uses the same variables as the one used to perform enirg.

qlegv.maps

by default is set to NULL. vector of strings, giving names of raster maps, containing qualitative environmental variables (see details). If set to NULL, automatically uses the same variables as the one used to perform enirg.

load.map

logical. Whether map should be uploaded as an object of class raster.

method

string. "normal" or "large".

prediction.name

string. A suffix for naming derived maps.

Details

Function enirg.predict, bases prediction on the results obtained from enirg function. User can choose to upload new environmental variables (i.e., to make predictions under different scenarios), or to use the same predictors, which were provided to compute the ENFA analysis. In both cases position of the niche is determined computing Mahalanobis distances for each pixel from the barycentre of the niche using the row coordinates of the ENFA analysis. Computed HSM has values ranging from 0 (complete absence) to 1 (complete presence).

Results should be later classified by using boyce.

Depending on the extension of the study area and the environmental variables used to performed the analysis, 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, but it is only available for Linux/Unix OS, at the moment.

Value

It computes HSM and stores it as raster a map layer in GRASS. It also returns a list of:

Author(s)

Fernando Canovas fcgarcia@ualg.pt, Chiara Magliozzi chiara.magliozzi@libero.it

References

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

See Also

enirg, import.egvs, predict.enfa, initGRASS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
## Not run: 
# starting GRASS session
initGRASS("/usr/bin/grass-7.0.0", home=tempdir())
initGRASS("C:/GRASS", home=tempdir())

data(apis.enirg)

# presences table
lina <- apis.enirg$presences

# loading the environmental information in batch
predictor.names <- c("tann", "mxtwm", "mntcm", "rfdm", "rfseas")
predictor.maps <- paste("std_", predictor.names, sep="")
file.names <- paste(system.file(package = "ENiRG"),
                    "/ext/", predictor.names, ".asc", sep="")

import.egvs(file.names, predictor.names)

# standardization
stdz.maps(predictor.names, predictor.maps)

# performing the Ecologigal Niche Factor Analysis (ENFA)
enirg(presences.table = lina, qtegv.maps = predictor.maps,
      species.name = "African", nf = 1, scannf = FALSE,
      method = "normal") -> apis.enfa

enirg.predict(apis.enfa, load.map = TRUE, method = "normal") -> apis.hsm


## End(Not run)

require(raster)

# Results can be directly loaded from:
data(apis.hsm)

plot(apis.hsm$African_predicted_hsm)
contour(apis.hsm$African_predicted_hsm, add = TRUE)

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