Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 如何以微秒为单位计算系统时间?_R_Performance - Fatal编程技术网

R 如何以微秒为单位计算系统时间?

R 如何以微秒为单位计算系统时间?,r,performance,R,Performance,有没有办法改变系统时间的精度 system.time(sum(seq(1.0,10^4,1))) 例如: round(system.time(sum(seq(1.0,10^4,1))),digits=6) 为此,应使用软件包microbenchmark 从软件包说明: Package: microbenchmark Title: Sub microsecond accurate timing functions. Description:

有没有办法改变系统时间的精度

system.time(sum(seq(1.0,10^4,1)))
例如:

round(system.time(sum(seq(1.0,10^4,1))),digits=6)

为此,应使用软件包
microbenchmark

从软件包
说明

Package:            microbenchmark
Title:              Sub microsecond accurate timing functions.
Description:        Provides infrastructure to accurately measure and compare the execution time of R expressions.