title: In R, when using named rows, can a sparse matrix column be added (concatenated) to another sparse matrix?
body: <p>I have two sparse matrices, <code>m1</code> and <code>m2</code>:</p>
  
  <pre><code>&gt; m1 &lt;- Matrix(data=0,nrow=2, ncol=1, sparse=TRUE, dimnames=list(c("b","d"),NULL))
  &gt; m2 &lt;- Matrix(data=0,nrow=2, ncol=1, sparse=TRUE, dimnames=list(c("a","b"),NULL))
  &gt; m1["b",1]&lt;- 4
  &gt; m2["a",1]&lt;- 5
  &gt; m1
  2 x 1 sparse Matrix of class "dgCMatrix"
  
  b 4
  d .
  &gt; m2
  2 x 1 sparse Matrix of class "dgCMatrix"
  
  a 5
  b .
  &gt;
  </code></pre>
  
  <p>and I want to <code>cbind()</code> them to make a sparse matrix like:</p>
  
  <pre><code>  [,1] [,2] 
  a    .    5
  b    4    .
  d    .    .
  </code></pre>
  
  <p>however <code>cbind()</code> ignores the named rows:</p>
  
  <pre><code>&gt; cbind(m1[,1],m2[,1])
    [,1] [,2]
  b    4    5
  d    0    0
  </code></pre>
  
  <p>is there some way to do this without a brute force loop?</p>