Is there an R timer or stopwatch function similar to MATLAB\'s tic/toc?
No, but here is a one line solution.
time.it<-function(f) { a<-proc.time(); out<-f(); print(proc.time()-a); out }
And an example for usage:
result<-time.it(function(){ A<-matrix(runif(5000^2),nrow=5000); b<-runif(5000); solve(A,b) } )
user system elapsed
12.788 12.268 8.623
Otherwise, microbenchmark is my favorite in terms of packages.