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.
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.
I have tried unlisting, but that did not help either.
How can I open these matlab matrix files and write as a matrix in R? Any thoughts?
code for the matlab read so far is simply:
> data<-readMat("filename")
> typeof(data)
[1] "list"
> 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