[R] Ubuntu vs Mac OS X
Hi ! I have installed R-2.7.0 64-bits on a computer where the new Ubuntu version (8.04) was installed. This computer is a 3.2 GHz Dual-core with 2 Gb of RAM. To test how fast (I though !) this machine is, I compared two simple matrix manipulations between Ubuntu and my laptop (a MacBook Pro 2.2 GHz with also 2 Gb of RAM under Mac OS X 10.5.2). By the way, I install the normal version of R on my MacBook Pro (32-bits) I decided to use the following matrix manipulation because they are typical manipulation that I was planning to do repetitively and with much larger matrices for my PhD project. First matrix manipulation: coco<-matrix(rnorm(100),1000,1000) system.time(coco2<-eigen(coco)) Results on the Mac: user system elapsed 7.301 0.974 7.376 Results on Ubuntu: user system elapsed 20.573 0.088 20.766 Second matrix manipulation: coco<-matrix(rnorm(100),1000,1000) system.time(coco3<-coco%*%coco) Results on the Mac: user system elapsed 0.360 0.024 0.224 Results on Ubuntu: user system elapsed 2.756 0.000 2.758 If I understand these results right, my MacBook Pro is far better than this Desk computer. I know Macs are good but that difference of performance is surprising me, did I do something wrong considering the large difference in processor? Thanks in advance Guillaume Blanchet __ R-help@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.
Re: [R] assistance with RDAtest beta version application
Hi !! Stanfield, Les (MNR) a écrit : > Thank you so much for coming to my rescue!: > > OK I have been able to open it (but only in the R editor. I assumed that we > had to generate our own files of XX.txt and YY.txt and bring them into R > before the program could run Is this right? > > Yon do not have to, but you can. I personally like to import the whole file I'm working (here "Table_11-3.txt") and go from there. If you feel more comfortable to do it another way there is no problem there ! > So I created two as tab delimited text files (Here they are). I am able to > bring them into R and when I edit them, they look fine. > > OK > This is the code to this stage: > > rdaTest <- function(YY.mat, XX.mat, WW.mat=NULL, >scale.Y=FALSE, testF=NULL, nperm=NULL, print.results=TRUE, > print.cum=FALSE) > { > library(MASS) > > # Read the data tables. Transform them into matrices Y, X, and W > YY.mat = -read.table("YY.txt") > XX.mat = -read.table("XX.txt") > > Y.mat=as.matrix(YY.mat) > >> X.mat=as.matrix(XX.mat) >> > bb<-edit(y.mat) > bb<-edit(x.mat) > > > But when I try to then convert these two files to mat files, nothing happens? > I'm assuming it has something to do with this step, but I can't figure it > out. Note: I tried creating base yy.mat and xx.mat files, by just changing > the file names, but that didn't work. > > So is this the problem, When I look at the y.mat and x.mat they look no > different than the original txt files > > > Here I get a bit confused Here is what I propose: ### Load the whole file tab11.3<-read.table("Table_11-3.txt",header=TRUE,row.names=1) ### Extract the species (Y) and the environmental variables (X) from tab11.3 Y<-tab11.3[,1:6] X<-tab11.3[,7:10] ### Calculate the RDA coco<-rdaTest(Y,X,testF=TRUE,nperm=999) coco ### Draw the triplot graph.rdaTest(coco,plot.type="F") With these couple of lines you should get the same results as the ones presented in Legendre and Legendre (1998). > Les Stanfield > > Have a nice day !! Guillaume Blanchet __ R-help@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.
Re: [R] assistance with RDAtest beta version application
Hi ! I am familiar with the rdaTest package. It works perfectly find for me. Can you give me more details on the problems you have so I can be of greater help ! Have a nice day ! Guillaume Blanchet PhD student Stanfield, Les (MNR) a écrit : > Pierre Legendre has developed a beta version of a new redundancy analysis > package called RdaTest that is available on his web page at the Universit® de > Montréal. The test example that is included with the package is based on the > example provided in his book (Numerical Ecology, Chapter 11 (Legendre & > Legendre 1998)) > > > I have downloaded the package and am attempting to run it so that I might > learn how to match the outputs from the RDA test to the outputs in the book. > this is a first step towards me eventually using this technique to analyze my > own data with this methodology. However, I keep hitting road blocks trying > to get the package to work and so am looking for someone who has used this > test package and could help me troubleshoot. > > Any takers? > > Les > > [[alternative HTML version deleted]] > > > > > __ > R-help@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. > __ R-help@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.