tran {analogue}R Documentation

Common data transformations and standardizations

Description

Provides common data transformations and standardizations useful for palaeoecological data. The function acts as a wrapper to function decostand in package vegan for several of the available options.

Usage

tran(x, method, a = 1, b = 0, base = exp(1), na.rm = FALSE,
     na.value = 0, ...)

Arguments

x A matrix-like object.
method transformation or standardization method to apply. See Details for available options.
a Constant to multiply x by. method = "log" only. Can be a vector, in which case the vector of values to multiply each column of x by.
b Constant to add to x before taking logs. method = "log" only. Can be a vector, in which case the vector of values to add to each column of x.
base the base with respect to which logarithms are computed. See log for further details. The default is to compute natural logarithms.
na.rm Should missing values be removed before some computations?
na.value The value with which to replace missing values (NA).
... Arguments passed to decostand.

Details

The function offers following standardization methods for community data:

Value

Returns the suitably transformed or standardized x. If x is a data frame, the returned value is like-wise a data frame. The returned object also has an attribute "tran" giving the name of applied transformation or standardization "method".

Author(s)

Gavin L. Simpson. Much of the functionality of tran is provided by decostand, written by Jari Oksanen.

References

Legendre, P. & Gallagher, E.D. (2001) Ecologically meaningful transformations for ordination of species data. Oecologia 129; 271-280.

Oksanen, J. (1983) Ordination of boreal heath-like vegetation with principal component analysis, correspondence analysis and multidimensional scaling. Vegetatio 52; 181-189.

See Also

decostand

Examples

data(swapdiat)
## convert percentages to proportions
sptrans <- tran(swapdiat, "pcent2prop")

## apply Hellinger transformation
spHell <- tran(swapdiat, "hellinger")

[Package analogue version 0.6-6 Index]