Learn R Programming

compositions (version 2.0-4)

perturbe: Perturbation of compositions

Description

The perturbation is the addition operation in the Aitchison geometry of the simplex.

Usage

perturbe(x,y)
## Methods for class "acomp"
## x + y
## x - y
##   - x

Value

An acomp vector or matrix.

Arguments

x

compositions of class acomp

y

compositions of class acomp

Author

K.Gerald v.d. Boogaart http://www.stat.boogaart.de, Raimon Tolosana-Delgado

Details

The perturbation is the basic addition operation of the Aitichson simplex as a vector space. It is defined by: $$ (x+y)_i = clo( (x_i y_i)_i )_i $$ perturbe and + compute this operation. The only difference is that + checks the class of its argument, while perturbe does not check the type of the arguments and can thus directly be applied to a composition in any form (unclassed, acomp, rcomp).
The - operation is the inverse of the addition in the usual way and defined by: $$(x-y)_i:=clo( (x_i/y_i)_i )_i$$ and as unary operation respectively as: $$(-x)_i:=clo( (1/y_i)_i )_i$$

References

Aitchison, J. (1986) The Statistical Analysis of Compositional Data Monographs on Statistics and Applied Probability. Chapman & Hall Ltd., London (UK). 416p.

See Also

acomp, *.aplus, +.rplus

Examples

Run this code
tmp <- -acomp(1:3)
tmp + acomp(1:3)


Run the code above in your browser using DataLab