powered by
Compute row and column \(p\)-norms.
row_norms(x, p = 2) col_norms(x, p = 2)
a sparse simple_triplet_matrix, or a dense matrix.
simple_triplet_matrix
a numeric at least one. Using Inf gives the maximum norm.
Inf
A vector with the row or column \(p\)-norms for the given matrix.
# NOT RUN { x <- matrix(1 : 9, 3L) ## Row lengths: row_norms(x) ## Column maxima: col_norms(x, Inf) # }
Run the code above in your browser using DataLab