[R] Deleting for() loop in function

Alberto Monteiro albmont at centroin.com.br
Wed Oct 10 20:03:51 CEST 2007

Jim Holtman wrote:
> One of the things that you should do is to use Rprof
> to see where time is being spent. 
Rprof is great! I didn't know such functionality existed.

But I am a very destructive user; I think I found a way
to break Rprof: if I do 

f <- my.slow.function 

then call


Rprof will report that f (and not my.slow.function) was
called <evil grin>.

I noticed that because I "tested" Rprof with one of my
programs that do test cases; these test cases run with
an array of functions, by calling each function from
the array - precisely what can't be traced by Rprof :-)

Alberto Monteiro

More information about the R-help mailing list