[R] sapply and loop

Mayeul KAUFFMANN
Sat, 16 Oct 2004 09:50:39 -0000

Zhen,

>how to count the exact time ?

system.time(base)
Returns CPU (and other) times that expr used.


If you only need seconds, you can also do

date();zz<-sapply(ma, myfunction);date()

I do not know about how to reduce the time.
For very comlex iterations, I use for( ) myself, which maybe inneficient.

Mayeul KAUFFMANN
Universit?? Pierre Mend??s France
Grenoble
France