I am looking for an elegant way of timing execution of R chunk preferably running the chunk multiple times automatically in background. (Magic function %%timeit in Python notebook does exactly that)
I know there are several ways of timing an R function or bunch of R code and there are few SO questions on that as well. All the methods are described in this article too.
However, most of them do not replicate the r code and ones which have option to replicate (like system.time or mircobenchbark) are ideal for using on a function but not on a chunk of code. (or may be I do not understand it right)
tictoc works pretty well for me except it will give the run time for only single execution but does not have option to run like 1000 times and averaging the run time. (again what %%timeit does)