Learn R Programming

compositions (version 2.0-1)

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

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)

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.

Details

The functions behave quite like +.rmult.

See Also

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

Examples

Run this code
# NOT RUN {
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