I have located a .MAT file that contains data that I wish to view in .CSV format, and I do not have a MATLAB license.
Happily, there is an R.matlab package, with a readMat function that enables reading .MAT files into R.
Unhappily, the product of applying readMat to my .MAT file is not a data frame, and I've been struggling all morning trying to figure out how to convert the readMat output into a data frame so that I can export the data as a .CSV file.
Here's the start of my R script:
library(R.matlab)
library(tidyr)
cats <- readMat("cats.mat")
head(cats)
And here's what I'm seeing on my Rstudio console:
> cats <- readMat("cats.mat")
>
> head(cats)
$catlist
, , 1
[,1]
catname List,10500
catgroup Numeric,10500
flag Numeric,10500
$catdate
[,1]
[1,] "01-Dec-2020"
I'd really appreciate help converting the readMat output into a dataframe (with columns: catname, catgroup, and flag)!! Thanks! :)