Hi everyone, I run the R loops on window XP and vista. Both are Intel core 2 Duo 2.2 GHz with 2 GB ram and XP is significantly faster than vista. Dose anyone know how speed up R loops in vista? Thank you in advance. Chunhao Tu
ctu wrote:> > Hi everyone, > I run the R loops on window XP and vista. Both are Intel core 2 Duo > 2.2 GHz with 2 GB ram and XP is significantly faster than vista. Dose > anyone know how speed up R loops in vista? > >Loops are not massively efficient within R. Look into using the apply() family of functions (eapply()/lapply()/mapply/rapply()/tapply()). There are plenty of threads in the archives on how to do things more efficiently with apply() rather than loops. Neil -- View this message in context: http://www.nabble.com/How-to-make-R-running-faster-tp17507590p17511667.html Sent from the R help mailing list archive at Nabble.com.
Dear Chunhao Tu, There is, coincidentally, a discussion of loops and related issues in the Help Desk column in the current issue of R News (see the newsletter link on CRAN). Regards, John ------------------------------ John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario, Canada web: socserv.mcmaster.ca/jfox> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]On> Behalf Of ctu at bigred.unl.edu > Sent: May-28-08 4:27 AM > To: r-help at r-project.org > Subject: [R] How to make R running faster > > Hi everyone, > I run the R loops on window XP and vista. Both are Intel core 2 Duo > 2.2 GHz with 2 GB ram and XP is significantly faster than vista. Dose > anyone know how speed up R loops in vista? > > Thank you in advance. > Chunhao Tu > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
ctu at bigred.unl.edu wrote:> Hi everyone, > I run the R loops on window XP and vista. Both are Intel core 2 Duo > 2.2 GHz with 2 GB ram and XP is significantly faster than vista. Dose > anyone know how speed up R loops in vista? > > Thank you in advance. > Chunhao Tu > > ______________________________________________ > 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. >This is a matter of operating system ... Mr Gates or Mr Ballmer may be able to help. No matter what you do in R the code will probably be faster in XP ... -- Dr Richard Rowe Zoology & Tropical Ecology School of Marine & Tropical Biology James Cook University Townsville 4811 AUSTRALIA ph +61 7 47 81 4851 fax +61 7 47 25 1570 JCU has CRICOS Provider Code 00117J