title: Block-diagonal binding of matrices
body: <p>Does R have a base function to bind matrices in a block-diagonal shape?</p>
  
  <p>The following does the job, but I'd like to know if there is a standard way:</p>
  
  <pre><code>a &lt;- matrix(1:6, 2, 3)
  b &lt;- matrix(7:10, 2, 2)
  
  rbind(cbind(a, matrix(0, nrow=nrow(a), ncol=ncol(b))),
        cbind(matrix(0, nrow=nrow(b), ncol=ncol(a)), b))
  
  #     [,1] [,2] [,3] [,4] [,5]
  #[1,]    1    3    5    0    0
  #[2,]    2    4    6    0    0
  #[3,]    0    0    0    7    9
  #[4,]    0    0    0    8   10
  </code></pre>