powered by
Computes the Aitchison scalar product of two compositions.
scalar(x, y, ...)# S4 method for numeric,numeric scalar(x, y)# S4 method for CompositionMatrix,CompositionMatrix scalar(x, y)
# S4 method for numeric,numeric scalar(x, y)
# S4 method for CompositionMatrix,CompositionMatrix scalar(x, y)
A numeric vector.
numeric
A CompositionMatrix object.
CompositionMatrix
Currently not used.
N. Frerebeau
Other operations in the simplex: arithmetic, closure(), perturbation(), powering()
arithmetic
closure()
perturbation()
powering()
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