nnzero: The number of non-zero values of a submatrix

Description Usage Arguments Details Value

Description

Retuen the number of non-zero values of the specified submatrix of a given sparse matrix rapidly

Usage

1
nnzero(m, rows = 1:dim(m)[1], cols = 1:dim(m)[2])

Arguments

m

The matrix

rows

The integer vector of row index(es) or logical vector indicated the selected rows

cols

The integer vector of column index(es) or logical vector indicated the selected cols

Details

This function implements faster calculation algorithm for the CsparseMatrix and RsparseMatrix class in the package Matrix.

Value

This function will return the number of non-zero values in the specified submatrix.



Search within the Corbi package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.