Learn R Programming

compositions (version 2.0-4)

rplusarithm: vectorial arithmetic for data sets with rplus class

Description

The positive quadrant forms a manifold of the real vector space. The induced operations +,-,*,/ give results valued in this real vector space (not necessarily inside the manifold).

Usage

mul.rplus(x,r)
## Methods for class rplus
##   x+y
##  x-y
##   -x
##   x*r
##   r*x
##   x/r

Value

rmult-objects containing the given operations on the rcomp manifold as subset of the \(R^D\). Only the addition and multiplication with positive numbers are internal operation and results in an rplus-object again.

Arguments

x

an rplus composition or dataset of compositions

y

an rplus composition or dataset of compositions

r

a numeric vector of size 1 or nrow(x)

Author

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

Details

The functions behave quite like +.rmult.

See Also

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

Examples

Run this code
rplus(1:5)* -1 + rplus(1:5)
data(SimulatedAmounts)
cdata <- rplus(sa.lognormals)
plot( tmp <- (cdata-mean(cdata))/msd(cdata) )
class(tmp)
mean(tmp)
msd(tmp)
var(tmp)

Run the code above in your browser using DataLab