centipede_plot: centipede_plot

View source: R/centipede.plot.r

centipede_plotR Documentation

centipede_plot

Description

Plot of species WA optima and tolerance

Usage

centipede_plot(x, spp, minN2 = 1, mult = 1)

Arguments

x

A tolerance weighted weighted-average model from WA

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

Details

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

Value

A ggplot object.

Examples

library(rioja)
data(SWAP)
mod <- WA(SWAP$spec, SWAP$pH, tolDW = TRUE)
coef(mod)
centipede_plot(mod, spp = SWAP$spec, minN2 = 20)

richardjtelford/palaeoSig documentation built on March 16, 2023, 8:08 a.m.