If you are using a Jupyter laptop. I think you need to install the R.matlab library first using
install.packages(c('R.matlab'), repos='http://cran.us.r-project.org')
Then we implement this library with
library(R.matlab)
After that, you may have a data frame in R say resi
#Save in Matlab v6 format with 'writeMat' writeMat("resi.mat", labpcexport = resi)
Now I go to Matlab and call it in this particular directory by converting the structure into a cell, and then the cells into a matrix as
resi=cell2mat(struct2cell(load('resi.mat')))
I hope this helps
rsc05 source share