Learn R Programming

goeveg (version 0.2.0)

specresponse: Species response curves

Description

This function draws species response curves for rough interpretation of a species response to environmental gradients or ordination axes. It is based on smooth.spline which fits a cubic smoothing spline to the supplied data. For drawing multiple curves into one plot use specresponses.

Usage

specresponse(species, var, main, xlab, method = "env", axis = 1, df = 5, ylog = FALSE)

Arguments

species
Vector containing species abundances (per plot).
var
Vector containing environmental variable (per plot) OR vegan ordination result object if method = "ord".
main
Optional: Main title.
xlab
Optional: Label of x-axis.
method
Method defining the type of variable. Default method = "env" fits a response curve to environmental variables. Alternatively method = "ord" fits a response along an ordination axis.
axis
Ordination axis (only if method = "ord").
df
Desired equivalent number of degrees of freedom (trace of the smoother matrix). Default = 5.
ylog
If set on TRUE the y-axis is displayed on a log-scale. Default is to not log y-axis.

Details

For response curves based on environmental variable gradients the argument var takes a single vector containing the variable corresponding to the species abundances. The direct response of a species to the environmental variable is shown. For a response to ordination axis (method = "ord") the argument var requires a vegan ordination result object (e.g. from decorana, cca, rda or metaMDS). Response of species to axis is shown; note that meaning of axis differ in unconstrained and constrained methods. First axis is used as default. A minimum of 10 occurences is recommenced to use response curves. Curves for species with less than 5 occurences are not drawn. It is recommended to filter the vegetation matrix for species with a minimum frequency of 10 before using this function.

See Also

specresponses

Examples

Run this code
## Draw species response curve on environmental variable
specresponse(schedenveg$ArrElat, schedenenv$soil_depth)

## Draw species response curve on environmental variable with
## custom labels, lower df and log-scaled y-axis
specresponse(schedenveg$ArrElat, schedenenv$soil_depth, main = "Arrhenatherum elatius",
       xlab = "Soil depth", df = 3, ylog = TRUE)

## Draw species response curve on ordination axes
## First calculate DCA
library(vegan)
scheden.dca <- decorana(schedenveg)

specresponse(schedenveg$ArrElat, scheden.dca, method = "ord")
specresponse(schedenveg$ArrElat, scheden.dca, method = "ord", axis = 2)

Run the code above in your browser using DataLab