title: R 3d array to 2d matrix
body: <p>Let's assume I have a 3d array of dimensions (x,y,z) and would like to restructure my data as a matrix of dimensions (x*y,z), something like:</p>
  
  <pre><code>my_array &lt;- array(1:600, dim=c(10,5,12))
  my_matrix&lt;-data.frame()
  
  for (j in 1:5) {
    for (i in 1:10) {
       my_matrix &lt;- rbind (my_matrix, my_array[i,j,1:12])
   }
  }
  </code></pre>
  
  <p>Could you suggest a faster and more elegant way?</p>
  
  <p>thanks</p>