Returns the nonzero elements of a sparse matrix.
nnz(x)
x
matrix.csr
nonzero elements of a sparse matrix x.
as.matrix.csr from the SparseM library.
as.matrix.csr
SparseM
nnz( as.matrix.csr( diag( 5)))