View source: R/centipede.plot.r
centipede_plot | R Documentation |
Plot of species WA optima and tolerance
centipede_plot(x, spp, minN2 = 1, mult = 1)
x |
A tolerance weighted weighted-average model from
|
spp |
data.frame of species data used to train the WA model |
minN2 |
numeric giving minimum N2 for inclusion in plot |
mult |
numeric multiplier for the tolerances |
Extracts and sorts WA
optima and tolerances and
generates a ggplot.
Tends only to work well when there are a reasonable number of taxa,
otherwise it is difficult to read the names on the axis.
Rare taxa can be excluded with the minN2
argument.
The tol.cut
argument in WA
may need to be set to
prevent very small tolerances in rare taxa.
This function is very similar to the caterpillar
plot, but produces a ggplot
A ggplot
object.
library(rioja) data(SWAP) mod <- WA(SWAP$spec, SWAP$pH, tolDW = TRUE) coef(mod) centipede_plot(mod, spp = SWAP$spec, minN2 = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.