Learn R Programming

compositions (version 2.0-8)

norm: Vector space norm

Description

Each of the considered space structures has an associated norm, which is computed for each element by these functions.

Usage

# S3 method for default
norm(x,...)
# S3 method for acomp
norm(x,...)
# S3 method for rcomp
norm(x,...)
# S3 method for aplus
norm(x,...)
# S3 method for rplus
norm(x,...)
# S3 method for rmult
norm(x,...)
# S3 method for rmult
norm(x,...)

Value

The norms of the given vectors. ATTENTON: norm.matrix is a wrapper around base::norm

Arguments

x

a dataset or a single vector of some type

...

currently not used, intended to select a different norm rule in the future

Author

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

See Also

normalize

Examples

Run this code
data(SimulatedAmounts)
tmp <- acomp(sa.lognormals)
mvar(tmp)
sum(norm( tmp - mean(tmp) )^2)/(nrow(tmp)-1)

Run the code above in your browser using DataLab