I am trying to measure the computation time of a function in R using system.time().
I want to run the function a few hundred times to get an average but I don’t want
to copy and paste that many times. Is there an easier way to do that?
I am trying to measure the computation time of a function in R using
Share
The microbenchmark package takes a
,times=option and has the added bonus of being a bit more accurate.And using the not-yet-released autoplot() method for ggplot2: