norm1 {robCompositions} | R Documentation |
Normalize a vector to length 1
Description
Scales a vector to a unit vector.
Usage
norm1(x)
Arguments
x |
a numeric vector |
Author(s)
Matthias Templ
Examples
data(expenditures)
i <- 1
D <- 6
vec <- c(rep(-1/i, i), 1, rep(0, (D-i-1)))
norm1(vec)
[Package robCompositions version 2.4.1 Index]