Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

norms

Row and Column Norms


Description

Compute row and column p-norms.

Usage

row_norms(x, p = 2)
col_norms(x, p = 2)

Arguments

x

a sparse simple_triplet_matrix, or a dense matrix.

p

a numeric at least one. Using Inf gives the maximum norm.

Value

A vector with the row or column p-norms for the given matrix.

Examples

x <- matrix(1 : 9, 3L)
## Row lengths:
row_norms(x)
## Column maxima:
col_norms(x, Inf)

slam

Sparse Lightweight Arrays and Matrices

v0.1-48
GPL-2
Authors
Kurt Hornik [aut, cre] (<https://orcid.org/0000-0003-4198-9911>), David Meyer [aut], Christian Buchta [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.