Learn R Programming

nexus (version 0.3.0)

arithmetic: Operations in the Simplex

Description

Operators performing operations in the simplex.

Usage

x %perturbe% y

x %power% y

# S4 method for CompositionMatrix,CompositionMatrix %perturbe%(x, y)

# S4 method for CompositionMatrix,numeric %power%(x, y)

# S4 method for numeric,CompositionMatrix %power%(x, y)

Value

A CompositionMatrix object or a numeric vector (same as x).

Arguments

x

A CompositionMatrix object.

y

A CompositionMatrix object or a numeric vector.

Author

N. Frerebeau

Details

%perturbe%

Perturbation operation.

%power%

Powering operation.

See Also

Other operations in the simplex: closure(), perturbation(), powering(), scalar()

Examples

Run this code
x <- as_composition(c(1, 2, 3))
y <- as_composition(c(1, 2, 1))

## Perturbation
perturbation(x, y)
x + y

## Powering
powering(y, 2)
y * 2

## Scalar product
scalar(x, y)

Run the code above in your browser using DataLab