Learn R Programming

ENiRG (version 1.0.1)

classify.map: Classification of the HSM

Description

classify.map classifies the Habitat Suitability Map (HSM) using suitability classes.

Usage

classify.map(map, suit.classes, output.name = NULL, load.map = FALSE)

Arguments

map
unclassified suitability map name from GRASS.
suit.classes
object of class boyce, giving the suitability classes.
output.name
string. Name for classified map.
load.map
logical. Whether the map should be uploaded as an object of class raster

Value

Function classify.map allows to classify the HSM according to breaks, which represents limits for intervals in the four suitability classes (unsuitable, marginal, suitable and optimal; Hirzel et al., 2006). Those values can be obtained by using CBI boyce. HSM classified map layer in GRASS can be also uploaded into R by setting load.map to TRUE.

References

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.

See Also

enirg, enirg.predict

Examples

Run this code
## 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 = 3, scannf = FALSE,
#       method = "normal") -> apis.enfa
# 
# enirg.predict(apis.enfa, load.map = TRUE, method = "normal") -> apis.hsm
# 
# data(cbi.results)
# 
# classify.map(map = "African_predicted_hsm",
#              suit.classes = cbi.results,
#              output.name = "African_hsm_class") -> apis.hsm.class
# ## End(Not run)

Run the code above in your browser using DataLab