Learn R Programming

compositions (version 1.01-1)

aplusarithm: 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)
##  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)

Value

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

synopsis

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) power.aplus(x,r)

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}

See Also

rmult, %*%.rmult

Examples

Run this code
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)

Run the code above in your browser using DataLab