Norm | R Documentation |
Calculates rowwise ||x||_p for each row x
of a matrix X
.
Norm(X, p = 1, invw = 1)
X |
A numeric matrix. |
p |
Order of the norm; the default is |
invw |
Inverse weights for each component,
with the length equal to either 1 or |
X
should be a matrix, not a vector.
A vector of the dimension equal to the nrow(X)
.
X <- matrix(c(1, -2, -3, 4, 5, -6), nrow = 3, ncol = 2) Norm(X) weights <- c(1, 2) Norm(X = X, invw = weights)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.