closure(x,...)## S4 method for signature 'numeric'closure(x, total =1, na.rm =TRUE)## S4 method for signature 'matrix'closure(x, total =1, na.rm =TRUE)
Arguments
x: A numeric vector or matrix.
...: Currently not used.
total: A numeric vector specifying the total amount to which the compositions should be closed (defaults to 1).
na.rm: A logical scalar: should missing values be removed?
Returns
A numeric vector or matrix (same as x).
Examples
x <- as_composition(c(1,2,3))y <- as_composition(c(1,2,1))## Perturbationperturbation(x, y)x + y
## Poweringpowering(y,2)y *2## Scalar productscalar(x, y)
See Also
Other operations in the simplex: arithmetic, perturbation(), powering(), scalar()