Timing an expression

timeit(expr, times = 1, ...)

Arguments

expr

an R expression

times

number of repetitions

...

additional arguments passed to base::eval

Value

the elapsed time in seconds

Examples


timeit(1 + 1)
#> elapsed 
#>       0 
timeit(1 + 1, times = 10)
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#>       0       0       0       0       0       0