I have a matlab .mat
file with table data type which I want to import in R. I am using 'readMat' for this and R is reading it as a List.
After that is there a way to convert the list into either a dataframe or table format in R? When I use as.dataframe
I get the following error :
Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, :
arguments imply differing number of rows: 5, 6, 1
A possible workaround I thought of is to export the table as a .csv from matlab and read it into R. But this solution does not work for me as some columns in the table are 1x700 arrays and in the CSV each these columns get expanded to 700 columns.
So my question is that is there a direct or indirect way to import a MATLAB table in R?