Skip to content
Prev 359302 / 398503 Next

How to speed up R program

There's no way for anyone to be sure without looking directly at the code. As Jim said, the prime suspect is inefficient use of memory and excessive use of virtual memory.

The book "Advanced R" by Hadley Wickham has a very detailed and easy to understand section on how to benchmark and optimize R code. That is probably your best starting point. That, and watching what happens to memory consumption and vm use while your program is running.