View source: R/function_norms.R
n1normed | R Documentation |
Norm a vector such that ||x||_1 is equal to the length of x
n1normed(x, to)
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(as.matrix(same.values), type = "O")) normed.values <- n1normed(same.values) print(norm(as.matrix(normed.values), type = "O"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.