Stopwatch function in R

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

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

10条回答
  •  被撕碎了的回忆
    2020-12-08 08:05

    There is a relatively new package tictoc that replicates the features exactly as you would use them in Matlab.

    http://cran.r-project.org/web/packages/tictoc/index.html

    ## Basic use case
    tic()
    print("Do something...")
    Sys.sleep(1)
    toc()
    # 1.034 sec elapsed
    

提交回复
热议问题