Plot of species WA optima and tolerance
centipede_plot(x, spp, minN2 = 1, mult = 1)
A tolerance weighted weighted-average model from WA
data.frame of species data used to train the WA model
numeric giving minimum N2 for inclusion in plot
numeric multiplier for the tolerances
A ggplot
object.
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 exluded 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
# NOT RUN {
library(rioja)
data(SWAP)
mod <- WA(SWAP$spec, SWAP$pH, tolDW=TRUE)
coef(mod)
centipede_plot(mod, spp = SWAP$spec, minN2 = 20)
# }
Run the code above in your browser using DataLab