nnz {KriSp}R Documentation

Nonzero elements of a sparse matrix

Description

Returns the nonzero elements of a sparse matrix.

Usage

nnz(x)

Arguments

x matrix of class matrix.csr.

Value

nonzero elements of a sparse matrix x.

See Also

as.matrix.csr from the SparseM library.

Examples

nnz( as.matrix.csr( diag( 5)))

[Package KriSp version 0.4 Index]