title: Importing an array from matlab into R
body: <p>I'm sure this is a simple problem, but I haven't been able to find an obvious solution. I have a series of model output array files (dim 180, 360, 12) generated in matlab that I need to open in R.</p>
  
  <p>I have attempted to use the R.matlab package, simply using the readMat command, and this results in a list object. Attempting to write this list into a matrix results in a memory allocation error.</p>
  
  <p>I have  tried unlisting, but that did not help either.</p>
  
  <p>How can I open these matlab matrix files and write as a matrix in R? Any thoughts?</p>
  
  <hr>
  
  <p>code for the matlab read so far is simply:</p>
  
  <pre><code>&gt; data&lt;-readMat("filename")
  &gt; typeof(data)
  [1] "list"
  &gt; str(data)
  List of 1
   $ pco2: num [1:180, 1:360, 1:12] NaN NaN NaN NaN NaN ...
   - attr(*, "header")=List of 3
   ..$ description: chr "MATLAB 5.0 MAT-file, Platform: GLNXA64, Created on: Thu Jul 26 10:36:42 2012 "
   ..$ version : chr "5"
   ..$ endian : chr "little
  </code></pre>