[R] Ways to speed up R code?

From: ecoinfo <ecoinformatics_at_gmail.com>
Date: Tue 18 Oct 2005 - 18:50:41 EST

Hi R-users:

Yesterday I ran a R code for 9 hours and it did not show any sign to stop. Then I interrupted it and found it had completed 82.5%.

This morning I decided to wait for another 11 hours to see what will happen. Wait a minute, I heard that transforming data.frame to matrix will make R code faster. Then I made the modification in my R code. Oooh, the new code finished within 30 minutes!!

Are there any other tips to speed up R program? Or someone could indicate me some documents or websites on R code optimization?

#OS: Win XP, CPU: Pentium IV, 3.20G, Memory: 1G
#for() loop: 1000*1616*3*41, 3 data.frames (dim = c(1616,5), c(1616),
c(1616) respectively)

Thanks in advance,

Xiaohua Dai, Dr.
* Postdoctoral in elephant-tree ecosystem simulation
Centre for Systems Research, Durban Institute of Technology
P.O.Box 953, Durban 4000, South Africa
Tel: +27-31-2042737(O) Fax: +27-31-2042736(O)
Mobile: +27-723682954
Publications: http://www.getcited.org/?MBR=11061629

R-help@stat.math.ethz.ch mailing list
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Oct 18 19:00:55 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:45 EST