Auxiliary functions to retrieve the indices of non-zero elements in sparse matrices.

A two-column matrix. Each row gives the row and column index of a
non-zero element in the supplied matrix `x`

.

- x = "dgCMatrix"
returns the indices of non-zero elements in matrices of class

`dgCMatrix`

- x = "matrix.csr"
returns the indices of non-zero elements in matrices of class

`matrix.csr`

- x = "matrix"
returns the indices of non-zero elements in matrices of base class

`matrix`

; equivalent to`which(x != 0, arr.ind=TRUE)`

Originally we used the `matrix.csr`

class from SparseM, but we
have switched to the class `dgCMatrix`

from package Matrix, as
that package is part of the R distribution bundle now.

The idea is to have a function similar to
`which(x != 0, arr.ind=TRUE)`

if `x`

is a matrix.

1 2 3 4 5 6 7 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ 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.