title: How to transform hyperspectral 3d array to a 2d matrix in R
body: <p>I have an array having dimension
  128 128 1000
  I would like to transform it to a 2d matrix in R
  Any suggestions?</p>
  <p><a href="https://i.stack.imgur.com/E7nN7.png" rel="nofollow noreferrer">enter image description here</a></p>