rcomparithm: Arithmetic operations for compositions in a real geometry

Description

The real compositions form a manifold of the real vector space. The induced operations +,-,*,/ give results valued in the real vector space, but possibly outside the simplex.

Usage

 ```1 2 3 4 5 6 7 8 9``` ```convex.rcomp(x,y,alpha=0.5) ## Methods for class "rcomp" ## x+y ## x-y ## -x ## x*r ## r*x ## x/r ```

Arguments

 `x` an rcomp composition or dataset of compositions `y` an rcomp composition or dataset of compositions `r` a numeric vector of size 1 or nrow(x) `alpha` a numeric vector of size 1 or nrow(x) with values between 0 and 1

Details

The functions behave quite like `+.rmult`.
The convex combination is defined as: `x*alpha + (1-alpha)*y`

Value

`rmult`-objects containing the given operations on the simplex as subset of the R^D. Only the convex combination `convex.rcomp` results in an `rcomp`-object again, since only this operation is closed.

Note

For `*` the arguments x and y can be exchanged.

Author(s)

K.Gerald v.d. Boogaart http://www.stat.boogaart.de

`+.rmult`, `+.acomp`,`cpt`, `rcomp`, `rmult`

Examples

 ```1 2 3 4 5 6 7 8 9``` ```rcomp(1:5)* -1 + rcomp(1:5) data(SimulatedAmounts) cdata <- rcomp(sa.lognormals) plot( tmp <- (cdata-mean(cdata))/msd(cdata) ) class(tmp) mean(tmp) msd(tmp) var(tmp) plot(convex.rcomp(rcomp(c(1,1,1)),sa.lognormals,0.1)) ```

Search within the compositions package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.