Utility function to extract row and column indices of the non-zero elements of a sparse matrix.

1 | ```
Matrix.to.Coord(M, index1 = TRUE)
``` |

`M` |
A matrix that is a subclass of sparseMatrix, as defined in the Matrix package. |

`index1` |
TRUE if the index of the first element should be 1, and FALSE if 0. |

A wrapper to Matrix.to.Pointers for `order='triplet'`

and `values=FALSE`

, for extracting the row and column indices
of a sparsity pattern from a matrix that has that same pattern.

A list with two named elements.

- rows
Integer vector containing row indices of non-zero elements

- cols
Integer vector containing column indices of non-zero elements

1 2 3 4 |

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.