aplusarithm {compositions}R Documentation

vectorial arithmetic for data sets with aplus class

Description

The positive vectors equipped with the perturbation (defined as the element-wise product) as Abelian sum, and powertransform (defined as the element-wise powering with a scalar) as scalar multiplication forms a real vector space. These vector space operations are defined here in a similar way to +.rmult.

Usage

perturbe.aplus(x,y)
## S3 method for class 'aplus'
x + y
## S3 method for class 'aplus'
x - y
## S3 method for class 'aplus'
x * y
## S3 method for class 'aplus'
x / y
##  Methods for aplus
##   x+y
##   x-y
##   -x
##   x*r
##   r*x
##   x/r
power.aplus(x,r)

Arguments

x

an aplus vector or dataset of vectors

y

an aplus vector or dataset of vectors

r

a numeric vector of size 1 or nrow(x)

Details

The operators try to mimic the parallel operation of R for vectors of real numbers to vectors of amounts, represented as matrices containing the vectors as rows and works like the operators for {rmult}

Value

an object of class "aplus" containing the result of the corresponding operation on the vectors.

Author(s)

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

See Also

rmult, %*%.rmult

Examples

x <- aplus(matrix( sqrt(1:12), ncol= 3 ))
x
x+x
x + aplus(1:3)
x * 1:4
1:4 * x
x / 1:4
x / 10
power.aplus(x,1:4)

[Package compositions version 2.0-8 Index]