powered by
Scales a vector to a unit vector.
norm1(x)
a numeric vector
Matthias Templ
data(expenditures) i <- 1 D <- 6 vec <- c(rep(-1/i, i), 1, rep(0, (D-i-1))) norm1(vec)
Run the code above in your browser using DataLab