[R] increase the usage of CPU and Memory

Richard R. Liu richard.liu at pueo-owl.ch
Wed Jun 27 20:17:29 CEST 2012


Hello Xi,

Have you tried replacing the for loop by an apply construct, e.g., lapply or sapply?  In my experience these functions are more efficient than for.  At any rate, if you succeed with, say, lapply, there are some R packages that support parallel processing versions.  I believe the package parallel is now part of base R, and a version of multicore's mclapply (which, in multicore, does not support Windows) is available.

Regards,
Richard

Richard R. Liu
Hebelstr. 136
CH-4056 Basel
Switzerland

Tel.:  +41 61 321 66 00
Mobil: +41 79 708 67 66
Email:  richard.liu at pueo-owl.ch






More information about the R-help mailing list