[R] : writeMat
hb at stat.berkeley.edu
Wed Sep 10 20:08:56 CEST 2008
I've managed to reproduce the error with R.matlab v1.2.2 and Matlab
There seems to be a bug introduced in R.matlab v1.2.2 (2008-07-12). In
this version we tried to optimize the speed of writeMat(), and
something failed (although all tests show the generated files loads
fine with readMat() in R). You have probably updated R.matlab to this
version, which is why "it worked before".
Until I identify and fix the bug, you can roll back to an earlier
version that I have verified works. Start a fresh R session and
install R.matlab v.1.2.1 as follows:
(Windows users should replace *.tar.gz with *.zip).
Let me know if this helps and thanks for reporting the bug
PS. It's time to update your R installation. DS.
On Wed, Sep 10, 2008 at 9:47 AM, erola pairo <erola.pairo at gmail.com> wrote:
> that's the information about R and R.matlab:
> R version 2.6.2 (2008-02-08)
> attached base packages:
>  stats graphics grDevices utils datasets methods base
> other attached packages:
>  R.matlab_1.2.3 R.oo_1.4.5 R.methodsS3_1.0.3 MASS_7.2-44
> loaded via a namespace (and not attached):
>  rcompgen_0.1-17
> The matlab's version i'm using is Matlab.7.6.0. and the error matlab gives
> me is:
> ??? Error using ==> load
> Unable to read MAT-file /home/erola/Dades/Saccharomyces cerevisiae/A.mat
> File may be corrupt.
> I tried to put in matlab preferences -v6 saving, but it doesn't work.
> I have the same Matlab's version that a month ago, I thought that it was
> all the same but I have a problem with my computer and I have to reinstall
> all again, and somethimg is been changed, but I don't know what.
> Thank you.
> On Tue, Sep 9, 2008 at 8:58 PM, Henrik Bengtsson <hb at stat.berkeley.edu>
>> On Tue, Sep 9, 2008 at 9:53 AM, erola pairo <erola.pairo at gmail.com> wrote:
>> > I write a .mat file using the writeMat() command, but when i try to load
>> > it
>> > in Matlab it says that file may be corrupt. I did it a month ago and it
>> > worked. It exists any option that I can change for making the file
>> > readable
>> > to Matlab?
>> >> A <- c(1:10)
>> >> dim(A) <- c(2,5)
>> >> library(R.matlab)
>> >> writeMat('A.mat', A=A)
>> > And what matlab say is:
>> > "file may be corrupt"
>> you need to provide much more information that this. Please see the
>> posting guides for the list (see footer), and provide sessionInfo() so
>> we know what version of R and R.matlab you are using. What version of
>> Matlab are you using? If it worked a month ago, what have you changed
>> since then?
>> (author of R.matlab)
>> > Regards
>> > [[alternative HTML version deleted]]
>> > ______________________________________________
>> > R-help at r-project.org mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> > PLEASE do read the posting guide
>> > http://www.R-project.org/posting-guide.html
>> > and provide commented, minimal, self-contained, reproducible code.
More information about the R-help