similar to: R and Matlab

Displaying 20 results from an estimated 400 matches similar to: "R and Matlab"

2010 Nov 29
3
Replacing several rows of a matrix at once
Hello Folks. This must be a silly question with a (not) obvious (to me) answer. Consider this: tmp <- matrix(1:200, nrow = 20) vec <- 300:309 tmp[9,] <- vec # replacing one row works fine p <- c(3, 11, 17) tmp[p,] <- vec # replacing multple rows pastes the values down a column and recycles vec. What I want to do is replace multiple rows simultaneously at once. I suppose I can
2010 Dec 04
2
Error in calcCurveGrob(x, x$debug) : End points must not be identical
Hi All... I haven?t found mention of this error anywhere. I'm trying to draw spline curves using grid graphics. Most of the time, I have no problems, but I have some data sets that give the error in the subject line. I'm not sure which end points are identical, but the end points passed to the function are definitely not identical. Any assistance appreciated! Bryan tst <-
2011 Jan 09
1
Rectangle height in lattice xyplot key
Dear All I have a problem with the height of the boxes in the key in the following. (The text is over 2 lines to accentuate the problem of no space between the rectangles.) Is there an easy way to put a space between the rectangles; size controls the width but there appears to be nothing for the height? xyplot(1~1, key = list(corner = c(0.8,0.8),
2010 Nov 20
1
Grid newbie: aligning & scaling viewports
Oh Knowledgeable Ones: I'm working on a project using grid graphics (for the first time). A toy example is given below, run it simply with >foobar() I am wondering why the pink dot and concentric circles are not centered on the 3-color axis system. Further, I feel like the concentric circles don't have the intended radius - if my math is right, the outmost circle should touch the
2010 Oct 04
1
Globbing inconsistencies, dir() vs. unlink()
I was trying to remove a directory and couldn't figure out why it was failing: > dir("~/p4/r-packages/IREval/Users", recursive=T) [1] "u0048513/p4/r-packages/IREval/DESCRIPTION" [2] "u0048513/p4/r-packages/IREval/R/IREval.R" [3] "u0048513/p4/r-packages/IREval/Read-and-delete-me" [4] "u0048513/p4/r-packages/IREval/tests/general.R" >
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 ---
2008 Sep 27
1
writeMat error
Hi I am using Ubuntu 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
2012 Apr 27
1
Hyperspec package: need to change spectra names in a stacked plot
Hi all, I need to insert the name of spectra in a stacked plot obtained with hyperspec. I use this command plot(spectra [c(-1:-4, -6:-8, -10:-12, -14:-16)], stacked = T) but, in this way R draw nameless spectra on the Y axis. How can I solve the problem? Thank you for any suggestion. Best regards, Roberto -- View this message in context:
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
2011 May 04
1
Outlier removal by Principal Component Analysis : error message
Hi, I am currently analysis Raman spectroscopic data with the hyperSpec package. I consulted the documentation on this package and I found an example work-flow dedicated to Raman spectroscopy (see the address : http://hyperspec.r-forge.r-project.org/chondro.pdf) I am currently trying to remove outliers thanks to PCA just as they did in the documentation, but I get a message error I can't
2011 Jul 13
3
Rcompression on MAC - where is it?
Hello I need to run an r-file that works on Windows on MAC. The first lines of the file are: library(R.matlab) library(Rcompression) Somehow I cannot find where Rcompression is. Am I missing something? Many thanks Ed
2008 Mar 26
2
Moving data between R and Matlab back and forth?
Hi to the list, I am trying to find a way to painlessly move structured data back and forth between R and Matlab (also Octave). For this purpose I found the R.matlab package great help. I wish to use a Matlab -v6 MAT file as an intermediary format, because it is well read by both Matlab and Octave. It is also well read by 'readMat' function in R.matlab package, but that is where I run
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', A=A) And what matlab say is: "file may be corrupt"
2009 May 11
1
Rcompression on Omegahat
I tried to install Rcompression (for reading Matlab files) options(CRAN = c(getOption("CRAN"), "http://www.omegahat.org/R")) install.packages("Rcompression") Warning: unable to access index for repository http://www.omegahat.org/R/bin/windows/contrib/2.9 Warning message: In getDependencies(pkgs, dependencies, available, lib) : package ?Rcompression? is not
2010 Dec 19
2
R.matlab memory use
Hi, I am trying to load into R a MATLAB format file (actually, as saved by octave). The file is about 300kB but R complains with a memory allocation error: > library(Rcompression) > library(R.matlab) Loading required package: R.oo Loading required package: R.methodsS3 R.methodsS3 v1.2.0 (2010-03-13) successfully loaded. See ?R.methodsS3 for help. R.oo v1.7.2 (2010-04-13) successfully
2010 Jul 15
4
Sweave: infelicities with lattice graphics
In a paper I'm writing using Sweave, I make use of lattice graphics, but don't want to explicitly show (or explain) in the article text the print() wrapper I need in code chunks for the graphs to appear. I can solve this by including each chunk twice, with different options, as in <<ortho-xyplot1-code, keep.source=TRUE, eval=FALSE>>= library(nlme) library(lattice)
2010 Feb 28
1
dots for sample
Dear R-Developers, could 'sample' gain a ... argument? As a convenience function, I added a sample Method to my hyperSpec class. This function however has a flag indicating whether the results should be returned directly as a hyperSpec object or rather as indices that give a random sample. For the moment, I use SetGeneric to add the dots argument, but this of course gives a warning
2012 Jan 30
1
Installing Rcompression package
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20120130/f1fca828/attachment.pl>
2009 May 05
1
Rcompression and Java Deflator
(this may be a duplicate post since I attached a file to the previous try...sorry about that) Below are the first few lines of a zlib compressed byte array written from Java with the Deflator class. > readBin("row_1",raw(),10000000) [1] 4c 45 50 e2 49 d5 86 bc 48 a1 32 5d 49 9d f5 90 48 e0 14 33 49 8f 54 6a 49 77 c9 48 48 d9 ec 56 47 91 48 f0 47 25 56 ef 47 b8 f5 7b 46 35 25 00