plot_NR | R Documentation |
The function represents the species' niche NR position within the environmental space E.
plot_NR( subnic, sig = NULL, sig_thres = 0.05, xlab = NULL, ylab = NULL, main = NA, col.axis = "azure3", lty.axis = 2, lwd.axis = 2, border.E = "black", col.E = "#92c5de", lty.E = 1, lwd.E = 1, pch.NR.pos = 21, cex.NR.pos = 1, col.NR.pos = "#a1d99b", col.NR.pt = "black", col.NR.lab = "black", cex.NR.lab = NA, fac.NR.lab = 1.2, col.arrow = "black", angle.arrow = 20, lwd.arrow = 2, length.arrow = 0.1, font.sp = 2, leg = T, posi.leg = "topleft", bty.leg = "n", ... )
subnic |
an object of class |
sig |
a factor defining the significance species, default NULL. |
sig_thres |
value for minimum significance, default 0.05 |
xlab |
label for x-axis, see title for more details. |
ylab |
label for y-axis, see title for more details. |
main |
a main title for the plot, see title for more details. |
col.axis |
axis color, see par for more details. |
lty.axis |
axis line type, see par for more details. |
lwd.axis |
axis width, see par for more details. |
border.E |
color border of E polygon, see polygon for more details. |
col.E |
inside color of E polygon, see polygon for more details. |
lty.E |
line type for the E border, see polygon for more details. |
lwd.E |
line width for the E border, see polygon for more details. |
pch.NR.pos |
type of points representing the NR position, see points for more details. |
cex.NR.pos |
size of points representing the NR position, see points for more details. |
col.NR.pos |
color of points representing the NR position, see points for more details. |
col.NR.pt |
point color contour if pch=21:25. |
col.NR.lab |
color of the species labels, see see text for more details. |
cex.NR.lab |
size of the species labels defautls NA for no labels, see see text for more details. |
fac.NR.lab |
factor for moving the NR labels from its original coordinates for clarity, by defaults they are multiply 1.2 |
col.arrow |
arrow color, see arrows for more details. |
angle.arrow |
arrow angle head, see arrows for more details. |
lwd.arrow |
arrow width, see arrows for more details. |
length.arrow |
arrow head length, see arrows for more details. |
font.sp |
An integer which specifies which font to use for species label. 1 corresponds to plain text (the default), 2 to bold face, 3 to italic and 4 to bold italic, see par for more details. |
leg |
a logical option for legend to be plotted or not, default leg=T. |
posi.leg |
setting legend positions with the following keywords "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center", see legend for more details. |
bty.leg |
the type of box to be drawn around the legend. The allowed values are "o" (the default) and "n", see legend for more details. |
... |
further arguments passed to or from other methods. |
The convex hulls measured is E is the environmental space. The arrows represent the species' NR marginality from the origin G. See doi: 10.7717/peerj.3364 for more details on the subniche concept.
library(subniche) data(doubs) dudi1 <- dudi.pca(doubs$env, scale = TRUE, scan = FALSE, nf = 3) nic1 <- niche(dudi1, doubs$fish, scann = FALSE) # number of sites N <- dim(nic1$ls)[1] #Create a factor which defines the subsets fact <- factor(c(rep(1,N/2),rep(2,N/2))) # nic1 will be use as reference and fact will be use to define the subniches environment subnic1 <- subniche(nic1, fact) sigi <- rtest(nic1,10) M <- length(sigi$pvalue) plot_NR(subnic1, sig=sigi$pvalue[-M], sig_thres= 0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.