Re: [R] Matlab import
I've used Henrik Bengtsson's R.matlab package several times to successfully read in matlab data files. It's normally as easy as: library(R.matlab) mats - readMat(matrixM.txt) - Tom Tom Short EPRI Schmitt, Corinna wrote: Dear R-Experts, here again a question concerning matlab. With the command matrixM=[1 2 3;4 5 6] a matrix under Matlab was constructed. It was than stored with the command save('matrixM.txt','matrixM'). Now I tried to import the data in R with the help of the command Z=matrix(scan(Z:/Software/R-Programme/matrixM.txt)) An error occurred. The result should be a matrix with the entries as mentioned above. Perhaps I made already an error in matlab. Has any one got an idea how to import the data and store it in R. In R I want to make further calculations with the matrix. I just installed R.matlab but could not find an example with could help me. Thanks, Corinna MATLAB 5.0 MAT-file, Platform: PCWIN, Created on: Tue Apr 10 13:17:44 2007 �IM���3���xãc``p�b6 æÒ À å31331;çeVøÅAjYX�[n| __ R-help@stat.math.ethz.ch 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. -- View this message in context: http://www.nabble.com/Matlab-import-tf3552511.html#a9918327 Sent from the R help mailing list archive at Nabble.com. __ R-help@stat.math.ethz.ch 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.
Re: [R] Matlab import
With readMat, don't use the -ascii option (which you didn't have in your first posting). I've never tried reading matlab's ascii format. In any case, readMat reads matlab's binary format. - Tom Tom Short EPRI Schmitt, Corinna wrote: Hallo, I've used Henrik Bengtsson's R.matlab package several times to successfully read in matlab data files. It's normally as easy as: library(R.matlab) mats - readMat(matrixM.txt) - Tom I have imported this package, too. And tried your commands with the new txt-file as mentioned in my last mail to the mailing list. I get the following error command: mats = readMat(Z:/Software/R-Programme/test.dat) Error in if (version == 256) { : Argument hat Länge 0 Zusätzlich: Warning message: Unknown endian: . Will assume Bigendian. in: readMat5Header(this, firstFourBytes = firstFourBytes) What did I wrong? Please check my txt-file which was constructed with the matlab command save('test.dat','matrixM','-ascii') Thanks, Corinna Schmitt, Corinna wrote: Dear R-Experts, here again a question concerning matlab. With the command matrixM=[1 2 3;4 5 6] a matrix under Matlab was constructed. It was than stored with the command save('matrixM.txt','matrixM'). Now I tried to import the data in R with the help of the command Z=matrix(scan(Z:/Software/R-Programme/matrixM.txt)) An error occurred. The result should be a matrix with the entries as mentioned above. Perhaps I made already an error in matlab. Has any one got an idea how to import the data and store it in R. In R I want to make further calculations with the matrix. I just installed R.matlab but could not find an example with could help me. Thanks, Corinna MATLAB 5.0 MAT-file, Platform: PCWIN, Created on: Tue Apr 10 13:17:44 2007 �IM���3���xãc``p�b6 æÒ À å31331;çeVøÅAjYX �[n| __ R-help@stat.math.ethz.ch 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. -- View this message in context: http://www.nabble.com/Matlab-import-tf3552511.html#a9918327 Sent from the R help mailing list archive at Nabble.com. __ R-help@stat.math.ethz.ch 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. __ R-help@stat.math.ethz.ch 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. -- View this message in context: http://www.nabble.com/Matlab-import-tf3552511.html#a9918787 Sent from the R help mailing list archive at Nabble.com. __ R-help@stat.math.ethz.ch 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.
Re: [R] Rpad
Vittorio, Those files being missing is what's causing the errors. Try recopying them to your server home location. Those files should be under Rpad/basehtml/gui/* in your R library installation. If not, try reinstalling or extract the necessary files right out of the Rpad_1.1.1.tar.gz file. - Tom Tom Short EPRI Solutions, Inc. vittorio wrote: I've just compiled and installed Rpad from the sources under *nix (freeBSD 6.1) and R 2.4.0, and followed the suggested procedure to setup an Rpad server step by step. Now when I try to execute whatever .Rpad example file the IE browser hangs endlessly with a loading page pop-up and the following errors show up at the end of the html page: .. DEBUG: DEPRECATED: dojo.xml.domUtil is deprecated, use dojo.dom instead DEBUG: DEPRECATED: dojo.xml.htmlUtil is deprecated, use dojo.html instead DEBUG: failed loading gui/src/widget/SortableTable.js with error: [SyntaxError: Errore di sintassi] DEBUG: failed loading gui/src/widget.js with error: [SyntaxError: Errore di sintassi] DEBUG: failed loading gui/src/__package__.js with error: [SyntaxError: Errore di sintassi] DEBUG: failed loading gui/src.js with error: [SyntaxError: Errore di sintassi] DEBUG: failed loading gui/__package__.js with error: [SyntaxError: Errore di sintassi] FATAL: Could not load 'dojo.widget.SortableTable'; last tried '__package__.js' Page loading...DEBUG: [object Object] ... Now the various .js files cited in the debug list of errors (by the way Errore di sintassi means Syntax error, i.e. exactly the same thing!!!) are actually missing in the ../basehtml/src/ directory. Besides, what should I do as far as dojo.xml.domUtil is deprecated is concerned? Ciao Vittorio __ R-help@stat.math.ethz.ch 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. -- View this message in context: http://www.nabble.com/-R--Rpad-tf2608079.html#a7280434 Sent from the R help mailing list archive at Nabble.com. __ R-help@stat.math.ethz.ch 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.
Re: [R] HTML nsmall vector format problem
John, I don't think nsmall uses a vector. Try the following with format (which HTML.data.frame uses): format(iris[1:2,1:2],nsmall=c(3,1)) Sepal.Length Sepal.Width 15.100 3.500 24.900 3.000 It looks like you'll have to do a format column by column with a loop. - Tom john seers (IFR) wrote: Hello All I am having a bit of trouble formatting my HTML with the desired number of digits after the decimal place. Am I doing something wrong/misunderstanding or is it a bug? Looking at the example supplied with ?HTML.data.frame: HTML(iris[1:2,1:2],nsmall=c(3,1),file=) Gives html output that includes the lines: /tr trtd class=firstcolumn1/tdtd class=cellinside5.100/tdtd class=cellinside3.500/td/tr trtd class=firstcolumn2/tdtd class=cellinside4.900/tdtd class=cellinside3.000/td/tr My understanding of how nsmall works, as a vector, the output should be something like: /tr trtd class=firstcolumn1/tdtd class=cellinside5.100/tdtd class=cellinside3.5/td/tr trtd class=firstcolumn2/tdtd class=cellinside4.900/tdtd class=cellinside3.0/td/tr i.e. first column with 3 digits after the decimal place and the second column with 1 digit after the decimal place. It appears to only use the first value in the vector. Has anybody got any suggestions? Thanks for any help. John Seers --- John Seers Institute of Food Research Norwich Research Park Colney Norwich NR4 7UA tel +44 (0)1603 251497 fax +44 (0)1603 507723 e-mail [EMAIL PROTECTED] e-disclaimer at http://www.ifr.ac.uk/edisclaimer/ http://www.ifr.ac.uk/edisclaimer/ Web sites: www.ifr.ac.uk http://www.ifr.ac.uk/ www.foodandhealthnetwork.com http://www.foodandhealthnetwork.com/ [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- View this message in context: http://www.nabble.com/HTML-nsmall-vector-format-problem-t1760896.html#a4791061 Sent from the R help forum at Nabble.com. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html