I\'ve been trying to dig into what the time-hogs are in some R code I\'ve written, so I\'m using Rprof. The output isn\'t yet very helpful though:
Rprof
The existing CRAN package profr and proftools are useful for this. The latter can use Rgraphviz which isn't always installable.
The R Wiki page on profiling has additional info and a nice script by Romain which can also visualize (but requires graphviz).