search for: writemat

Displaying 9 results from an estimated 9 matches for "writemat".

2008 Sep 27
1
writeMat error
...8.04 64 bit, R as below, Matlab 7.6.0. I would like to transfer mat files back and forward between R and Matlab. Whilst I have used Matlab for years its been a long time since I have used R (hence question may be a bit simple) Running code A <- c(1:10) dim(A) <- c(2,5) library(R.matlab) writeMat('A.mat', A=A) Does not appear to generate any mat file either in local directory or in /tmp/R* I tried both current version of R.matlab and older version because of bug https://stat.ethz.ch/pipermail/r-help/2008-September/173432.html A <- matrix(1:27, ncol=3) B <- as.matrix(1:10) f...
2006 Dec 22
2
Pb with R.matlab
Hello, I have problems running the R.matlab package. I work with R 2.3.1, under windows (using the Rgui). It seems that, even after loading the package, the "simple" functions such as writeMat() or readMat() are not recognized. For example, the following script leads to an error: > install.packages("R.matlab") --- Please select a CRAN mirror for use in this session --- essai de l'URL 'http://cran.miroir-francais.fr/bin/windows/contrib/2.3/R.matlab_1.1.2.zip' C...
2008 Sep 09
1
: writeMat
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',...
2008 Oct 28
1
Saving a 3d array into a matlab file
Dear R users, I am tryting to save an 3d array to a matlab file like the following. A <- array(1:24, c(2,3,4)) writeMat(filename, A=A) But if I load the mat file from Matlab, it is not 3d matrix anymore. Does anyone know how I can preserve the 3d structure? Any help will be greatly appreciated. Minho Chae [[alternative HTML version deleted]]
2011 Apr 27
1
Eval to write many files
Dear all I am looking for a shorter way and more elegant to write the following for (i in c(1:length(Shadowlist))){ filename<-paste('/home/apa/maps/',model,i,'.mat',sep="") varname<-paste(model,'_shadow',i,sep="") eval(parse(text=paste('writeMat(filename,',varname,'=Shadowlist[[i]])',sep=""))) } actually I do not like eval at the end but I wanted to control the varname inside the writeMat command writeMat(filename,varname=Shadowlist[[i]])
2010 Oct 28
2
R and Matlab
Dear Group, I am looking for ways to use R and Matlab. Doing the data transformations in R and using the data in Matlab to analyze with some pre-defined scripts. Any good ways to transfer the data into matlab in its most recent version? I tried using R.matlab but the writeMat output is not readable by Matlab. I just need to output a data.frame and read it as is into matlab where I can do any needed transformations on the variables. Thanks, S
2008 Mar 26
2
Moving data between R and Matlab back and forth?
..., 2, 4) > labpc <- data.frame(Maker, CPUspeed, HDD, RAM) > labpc Maker CPUspeed HDD RAM 1 HP 2.0 80 2 2 HP 4.0 250 2 3 Sony 2.5 100 1 4 DELL 2.5 100 2 5 whitebox 2.0 80 2 6 whitebox 5.0 300 4 > library(R.matlab) > writeMat("labpc.mat", labpcdata = labpc) -------------------------------------------------------------- -------------------------------------------------------------- In MATLAB - everything is as expected -------------------------------------------------------------- load('labpc.mat') &g...
2010 Oct 31
1
R-help Digest, Vol 92, Issue 31
...ts.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Dear Henrik, sorry for bothering you with a report hastily pasted together and not particularly nice for you as I used my toy data flu from a non-standard package. I should have better used e.g. the iris. I'm aware that writeMat doesn't deal with S4 objects. In fact, if I'd overlook the error message, there's the 2nd chance to see that the file size is 0B. In fact the attempt to save flu directly was a classical "autopilot" error, that's why I tried to save the x afterwards. So the problem here...
2007 Jun 22
3
How to run "mathematica" or "c" programs in R?
I have some programs which were writen in mathematica or c language, but I donot know how to use these software. So I want to run them in R. Can I do it ? How to run "mathematica" or "c" programs in R? Jian Zhang [[alternative HTML version deleted]]