normalize: Normalize vectors to norm 1

View source: R/compositions.R

normalizeR Documentation

Normalize vectors to norm 1

Description

Normalize vectors to norm 1.

Usage

normalize(x,...)
## Default S3 method:
normalize(x,...)

Arguments

x

a dataset or a single vector of some type

...

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

Value

The vectors given, but normalized to norm 1.

Author(s)

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

See Also

norm.rmult

Examples

data(SimulatedAmounts)
normalize(c(1,2,3))
normalize(acomp(c(1,2,3)))
norm(normalize(acomp(sa.groups)))

compositions documentation built on June 22, 2024, 12:15 p.m.