R: Help read a specific .mat file in R

So, I tried to read this particular .mat file in R. I don't know too much about Matlab, but I know enough that the R.matlab package can only read uncompressed data in R and save it as uncompressed, I need to save it as such in matlab using save new.mat -v6.

Ok, so I did it, but when I used readMat("new.mat")R, it just got stuck in loading that forever. I also tried using the hdf5 package through:

> hdf5load("new.mat", load=FALSE)->g
Error in hdf5load("new.mat", load = FALSE) : 
  can't handle hdf type 201331051

I am not sure what this problem may be, but if someone wants to try to figure it out, the file is at http: // dibernardo. tigem.it/MANTRA/MANTRA_online/Matlab_Code%26Data.html is called inventory.mat (the first file).

Thank you for your help!

+5
source share
2 answers

This particular file has one object, inventorywhich is an object struct, with many different things inside it. Some of them are arrays of cells, others are vectors of doubles or logic, and a couple are doubling matrices. R.matlab doesn't seem to like cell arrays inside structures, but I'm not sure what causes problems for R to load this. For these reasons, I usually recommend avoiding matching structures in Matlab with objects in R. It looks like a list, and this one can be converted to a list, but this is not always a good idea.

, , . ids = inventory.instance_ids .mat, , , 1 . , , csvwrite, , .

, Matlab R, , .

R.matlab + R/DCOM ( Windows).

R.matlab, R Matlab , , .mat(, ,.rdat). , . , , ( MathWorks), . , , , , . , , , .

+4
+2

All Articles