plot_niche_signal {enmpa} | R Documentation |
Plot Niche Signal results
Description
Plots to interpret results from niche_signal tests (Cobos & Peterson (2022) doi:10.17161/bi.v17i.15985).
Usage
plot_niche_signal(niche_signal_list, statistic = "mean",
variables = NULL, ellipses = FALSE, level = 0.99,
breaks = "Sturges", main = "", xlab = NULL, ylab = NULL,
h_col = "lightgray", h_cex = 0.8, lty = 2, lwd = 1,
l_col = c("blue", "black"), e_col = c("black", "red"),
pch = 19, pt_cex = c(1.3, 0.8), pt_col = c("black", "red"),
...)
plot_niche_signal_univariate(niche_signal_univariate_list, statistic = "mean",
breaks = "Sturges", main = "", xlab = NULL,
ylab = "Frequency", h_col = "lightgray",
h_cex = 0.8, lty = 2, lwd = 1,
l_col = c("blue", "black"), ...)
plot_niche_signal_permanova(niche_signal_permanova_list, variables = NULL,
ellipses = FALSE, level = 0.99, main = "",
xlab = NULL, ylab = NULL,
e_col = c("black", "red"), lty = 2, lwd = 1,
pch = 19, pt_cex = c(1.3, 0.8),
pt_col = c("black", "red"), ...)
Arguments
niche_signal_list |
list of results from niche_signal. |
statistic |
(character) name of the statistic for which results will be explored when results come for univariate analysis. Default = "mean". Options are: "mean", "median", "SD", and "range". |
variables |
(character) name of variables to used in plots when
results come from analysis using the |
ellipses |
(logical) whether to use ellipses to represent all and positive data when results come from PERMANOVA. The default, FALSE, plots points instead. |
level |
(numeric) value from 0 to 1 representing the limit of the ellipse to be plotted. Default = 0.99. |
breaks |
breaks in the histogram as in |
main |
(character) title for plot. Default = "". |
xlab |
(character) x axis label. Default = NULL. For results from PERMANOVA, appropriate variable names are used. |
ylab |
(character) y axis label. Default = NULL. For univariate results, the default turn into "Frequency". For results from PERMANOVA, appropriate variable names are used. |
h_col |
a color to be used to fill the bars of histograms. Default = "lightgray". |
h_cex |
(numeric) value by which plotting text and symbols should be magnified relative to the default in histograms. Default = 0.8. |
lty |
(numeric) line type. See options in |
lwd |
(numeric) line width. See options in |
l_col |
line color for observed value of positives and confidence intervals. Default = c("blue", "black"). |
e_col |
color of ellipse lines for all and positive data. Default = c("black", "red"). |
pch |
point type. See options in |
pt_cex |
(numeric) value by which points will be magnified. Values for all and positive points are recommended. Default = c(1.3, 0.8). |
pt_col |
color for points. Values for all and positive points are recommended. Default = c("black", "red"). |
... |
other plotting arguments to be used. |
niche_signal_univariate_list |
list of results from niche_signal_univariate. |
niche_signal_permanova_list |
list of results from niche_signal_permanova. |
Value
A plot.
Examples
# Load species occurrences and environmental data.
data("enm_data", package = "enmpa")
head(enm_data)
# Detection of niche signal using an univariate non-parametric test
sn_bio1 <- niche_signal(data = enm_data,
variables = "bio_1",
condition = "Sp",
method = "univariate")
plot_niche_signal(sn_bio1, variables = "bio_1")
sn_bio12 <- niche_signal(data = enm_data,
variables = "bio_12",
condition = "Sp",
method = "univariate")
plot_niche_signal(sn_bio12, variables = "bio_12")