norm(x, type)
"Matrix"
, or an object of class
"eigen.Hermitian"
or
"svd.Matrix"
.
No missing values or IEEE special values are allowed.
type
is used only when
x
is a Matrix.
If
A
is a matrix, its one norm is the maximum l-1 norm of its columns,
and its infinity norm is the maximum l-1 norm of it rows, its two norm
is its largest singular value, and its Frobenius norm is its l-2 norm if
the entire matrix were taken as a vector.
Golub, G., and Van Loan, C. F. (1989).
Matrix Computations,
2nd edition, Johns Hopkins, Baltimore.
library(Matrix) x <- Matrix( rnorm(9), 3, 3) norm(x, type = "1" ) # one-norm of x (maximum column sum)