title: What is R's multidimensional equivalent of rbind and cbind?
body: <p>When working with matrices in R, one can put them side-by-side or stack them top of each other using cbind and rbind, respectively. What is the equivalent function for stacking matrices or arrays in other dimensions?</p>
  
  <p>For example, the following creates a pair of 2x2 matrices, each having 4 elements:</p>
  
  <pre><code>x = cbind(1:2,3:4)
  y = cbind(5:6,7:8)
  </code></pre>
  
  <p>What is the code to combine them into a 2x2x2 array with 8 elements?</p>