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

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

[复制链接]
发表于 2012-2-16 19:59:26 | 显示全部楼层 |阅读模式
winProgressBar(utils)
winProgressBar()所属R语言包:utils

                                        Progress Bars under Windows
                                         Windows下的进度条

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

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

Put up a Windows progress bar widget.
提出了一个Windows进度栏部件。


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


winProgressBar(title = "R progress bar", label = "",
               min = 0, max = 1, initial = 0, width = 300)

getWinProgressBar(pb)
setWinProgressBar(pb, value, title = NULL, label = NULL)
## S3 method for class 'winProgressBar'
close(con, ...)



参数----------Arguments----------

参数:title, label
character strings, giving the window title and the label on the dialog box respectively.
字符串,分别给予对话框窗口的标题和标签。


参数:min, max
(finite) numeric values for the extremes of the progress bar.
进度条的极端数值(有限)。


参数:initial, value
initial or new value for the progress bar.
进度条的初始或新的价值。


参数:width
the width of the progress bar in pixels: the dialog box will be 40 pixels wider (plus frame).
宽度:以像素为单位的进度条对话框将是40个像素宽(加帧)。


参数:pb, con
an object of class "winProgressBar".
对象类"winProgressBar"。


参数:...
for consistency with the generic.
与通用的一致性。


Details

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

winProgressBar will display a progress bar centred on the screen.  Space will be allocated for the label only if it is non-empty.
winProgressBar会显示一个进度栏在屏幕上居中。只有当它是不空的空间将被分配给标签。

setWinProgessBar will update the value and for non-NULL values, the title and label (provided there was one when the widget was created).  Missing (NA) and out-of-range values of value will be (silently) ignored.
setWinProgessBar将更新的价值和非NULL值,标题和标签(只要有一个部件被创建时的)。失踪(NA)value(默默)忽略和范围的值。

The progress bar should be closed when finished with, but it will be garbage-collected once no R object refers to it.
进度栏应该是closed时完成,但一旦没有R对象是指它,这将是垃圾收集。


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

For winProgressBar an object of class "winProgressBar".
winProgressBar类对象"winProgressBar"。

For getWinProgressBar and setWinProgressBar, a length-one numeric vector giving the previous value (invisibly for setWinProgressBar).
getWinProgressBar和setWinProgressBar,长度一个数字向量,使以前的值(无形setWinProgressBar)。


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

txtProgressBar, tkProgressBar
txtProgressBar,tkProgressBar


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


pb <- winProgressBar("test progress bar", "Some information in %",
                     0, 100, 50)
Sys.sleep(0.5)
u <- c(0, sort(runif(20, 0 ,100)), 100)
for(i in u) {
    Sys.sleep(0.1)
    info <- sprintf("%d%% done", round(i))
    setWinProgressBar(pb, i, sprintf("test (%s)", info), info)
}
Sys.sleep(5)
close(pb)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-6 07:19 , Processed in 0.024688 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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