To analyze which part of your code is taking a long time, use the
Rprof() function; it will tell you how much time was spent
in each function, both R and user-written:
Rprof(output.file)
... code to profile ...
Rprof(NULL)
summaryRprof(output.file)
The last command parses the file you made using Rprof() and presents it in a nice clear format.
Keywords: R, profiling, speed, run-time, timing
Last modified: 1/20/12.