title: How to convert a sparse matrix into a matrix of index and value of non-zero element
body: <p>We can construct a sparse matrix from an index and value of non-zero element with the <code>sparseMatrix</code> or <code>spMatrix</code>. Is there any function convert a sparse matrix back to an index and value of all non-zero element? For example</p>
  
  <pre><code>i &lt;- c(1,3,5); j &lt;- c(1,3,4); x &lt;- 1:3
  A &lt;- sparseMatrix(i, j, x = x)
  
  B &lt;- sparseToVector(A)
  ## test case:
  identical(B,cbind(i,j,x))
  </code></pre>
  
  <p>Is there any function do a similar job as <code>sparseToVector</code>?</p>