Re: [R] How to make R running faster

From: Neil Shephard <nshephard_at_gmail.com>
Date: Wed, 28 May 2008 05:35:54 -0700 (PDT)

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.

______________________________________________
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.
Received on Wed 28 May 2008 - 12:39:57 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 28 May 2008 - 16:30:42 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive