resp2var | R Documentation |
A view of the species probability into a two-dimensional environmental space.
resp2var(model, variable1 , variable2, modelID = NULL, data = NULL, n = 1000,
new_data = NULL, extrapolate = FALSE, add_bar = TRUE,
add_limits = FALSE, color.palette = NULL, xlab = NULL, ylab = NULL,
...)
model |
an object of class |
variable1 |
(character) name of the variable to be plotted in x axis. |
variable2 |
(character) name of the variable to be plotted in y axis. |
modelID |
(character) name of the ModelID if inputed |
data |
data.frame or matrix of data to be used in model calibration. Default = NULL. |
n |
(numeric) an integer guiding the number of breaks. Default = 100 |
new_data |
a |
extrapolate |
(logical) whether to allow extrapolation to study the
behavior of the response outside the calibration limits. Ignored if
|
add_bar |
(logical) whether to add bar legend. Default = TRUE. |
add_limits |
(logical) whether to add calibration limits if
|
color.palette |
(function) a color palette function to be used to assign colors in the plot. Default = function(n) rev(hcl.colors(n, "terrain")). |
xlab |
(character) a label for the x axis. The default, NULL, uses the
name defined in |
ylab |
(character) a label for the y axis. The default, NULL, uses the
name defined in |
... |
additional arguments passed to
|
The function calculates probabilities by focusing on each combination of the two supplied environmental variable while keeping all other variables constant at their mean values.
A plot with the response interaction of two environmental dimensions for
variable1
and variable2
, and don't return anything.
# Load a fitted selected model
data(sel_fit, package = "enmpa")
# Two-Way interaction response plot in the calibration limits
resp2var(sel_fit, variable1 = "bio_1", variable2 = "bio_12", xlab = "BIO-1",
ylab = "BIO-12", modelID = "ModelID_7")
# Two-Way interaction response plot allowing extrapolation
resp2var(sel_fit, variable1 = "bio_1", variable2 = "bio_12", xlab = "BIO-1",
ylab = "BIO-12", modelID = "ModelID_7", extrapolate = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.