Learn R Programming

analogue (version 0.14-0)

optima: Weighted averaging optima and tolerance ranges

Description

Computes weighted average optima and tolerance ranges from species abundances and values of the environment.

Usage

optima(x, ...)

## S3 method for class 'default': optima(x, env, boot = FALSE, nboot = 1000, alpha = 0.05, ...)

## S3 method for class 'default': tolerance(x, env, useN2 = TRUE, ...)

Arguments

x
Species data matrix or data frame.
env
Numeric; variable for which optima or tolerances are required.
boot, nboot
logical (boot), numeric (nboot); should bootstrap resampling be employed to estimate the optima, and if so how many bootstrap samples to draw?
alpha
numeric; 1 - alpha gives the coverage for the percentile bootstrap confidence interval.
useN2
logical; should Hill's N2 values be used to produce un-biased tolerances?
...
Arguments passed to other methods.

Value

  • Both functions return a named vector containing the WA optima or tolerances for the environmental gradient specified by env.

See Also

wa

Examples

Run this code
## Load the Imbrie & Kipp data and
## summer sea-surface temperatures
data(ImbrieKipp)
data(SumSST)

## WA optima
(opt <- optima(ImbrieKipp, SumSST))

## WA tolerances
(tol <- tolerance(ImbrieKipp, SumSST, useN2 = TRUE))

## caterpillar plot
caterpillarPlot(opt, tol)

## convert to data frame
as.data.frame(opt)
as.data.frame(tol)

## bootstrap WA optima - 100 resamples too low for SD & pCI
bopt <- optima(ImbrieKipp, SumSST, boot = TRUE, nboot = 100)
head(bopt)

Run the code above in your browser using DataLab