找回密码
 注册
查看: 8066|回复: 0

R语言:proc.time()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 17:39:59 | 显示全部楼层 |阅读模式
proc.time(base)
proc.time()所属R语言包:base

                                        Running Time of R
                                         R的运行时间

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

proc.time determines how much real and CPU time (in seconds) the currently running R process has already taken.
proc.time决定多少真正的CPU时间(秒)目前正在运行的R进程已经采取了。


用法----------Usage----------


proc.time()



Details

详情----------Details----------

proc.time returns five elements for backwards compatibility, but its print method prints a named vector of length 3.  The first two entries are the total user and system CPU times of the current R process and any child processes on which it has waited, and the third entry is the "real" elapsed time since the process was started.
proc.time返回向后兼容性的五个要素,但其print方法打印一个长度为3名为向量。前两个项目是目前R进程的总用户和系统CPU时间,它已经等待任何子进程,进程开始以来,第三项是真正的经过时间。


值----------Value----------

An object of class "proc_time" which is a numeric vector of length 5, containing the user, system, and total elapsed times for the currently running R process, and the cumulative sum of user and system times of any child processes spawned by it on which it has waited.  (The print method combines the child times with those of the main process.)
"proc_time"类的对象这是一个长度为5的数字向量,包含R进程当前正在运行的用户,系统,总运行时间和的任何子用户和系统时间的累计总和进程生成它等待。 (print方法结合主进程的儿童时代。)

The definition of "user" and "system" times is from your OS.  Typically it is something like
用户,系统倍的定义是从你的操作系统。它通常是一样的东西

The "user time" is the CPU time charged for the execution of user instructions of the calling process.  The "system time" is the CPU time charged for execution by the system on behalf of the calling process.
“用户的时间,是为调用进程的用户指令执行收费的CPU时间。 “系统时间”是被控系统为代表调用进程执行的CPU时间。

Times of child processes are not available on Windows and will always be given as NA.
子进程的时间是不是在Windows上使用,将永远为NA。

The resolution of the times will be system-specific and on Unix-alikes times are rounded down to milliseconds.  On modern systems they will be that accurate, but on older systems they might be accurate to 1/100 or 1/60 sec.  They are typically available to 10ms on Windows.
时代的决议,将特定系统和UNIX相似者倍下调到毫秒。现代系统上,他们将是准确的,但在旧系统中,他们可能会精确到1/100或1/60秒。他们通常可以在Windows 10毫秒。

This is a primitive function.
这是一种原始的功能。


参考文献----------References----------

The New S Language. Wadsworth & Brooks/Cole.

参见----------See Also----------

system.time for timing an R expression, gc.time for how much of the time was spent in garbage collection.
system.timeR的表达,gc.time有多少时间是在垃圾收集上花费的时间。


举例----------Examples----------


## a way to time an R expression: system.time is preferred[#R表达方式:system.time是首选]
ptm <- proc.time()
for (i in 1:50) mad(stats::runif(500))
proc.time() - ptm


转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-2-2 19:03 , Processed in 0.060302 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表