Stopwatch function in R

前端 未结 10 1981
后悔当初
后悔当初 2020-12-08 07:27

Is there an R timer or stopwatch function similar to MATLAB\'s tic/toc?

10条回答
  •  庸人自扰
    2020-12-08 08:24

    As of the date 2015-03-25, and possibly earlier, the pracma package contains the functions tic() and toc().

    Example:

    > library(pracma)
    > tic()
    > for(i in 1:10000) mad(runif(10000))    # kill time
    > toc()
    elapsed time is 18.610000 seconds 
    

提交回复
热议问题