View source: R/function_norms.R
n2normed | R Documentation |
Norm a vector such that ||x||_2 = 1 is equal to the length of
n2normed(x, to = NA)
x |
numeric vector |
to |
numeric, to this value, the norm gets scaled |
numeric vector with same length as x
set.seed(1) same.values <- rnorm(n = 10) print(norm(same.values, type = "2")) normed.values <- n2normed(same.values) print(norm(normed.values, type = "2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.