rp.slider(rpanel)
rp.slider()所属R语言包:rpanel
Slider for an rpanel
滑块的rpanel的
译者:生物统计家园网 机器人LoveR
描述----------Description----------
用法----------Usage----------
rp.slider(panel, var, from, to, action = I, title = deparse(substitute(var)),
log = FALSE, showvalue = FALSE, resolution = 0, initval = NULL,
parent = window, pos = NULL, horizontal = TRUE, ...)
参数----------Arguments----------
参数:panel
the panel in which the slider appears. This may be passed as a panelname string or the panel object itself.
显示面板,其中的滑块。这可能是通过作为一个panelname的字符串或面板对象本身。
参数:var
the name of the variable that the slider controls.
的名称的变量,滑块控制。
参数:from
the lower limit of the range of values to which the slider can be set.
滑块可以设置的范围内的值的下限。
参数:to
the upper limit of the range of values to which the slider can be set.
滑块可以设置的值的范围内的上限。
参数:log
a logical variable which controls whether the scale of the slider is logarithmic.
一个逻辑变量,其控制的滑块的规模是否是对数。
参数:showvalue
a logical variable which determines whether the present value of "var" is shown. This is forced to FALSE when log is TRUE.
一个逻辑变量确定的现值是否显示“无功”。这是被迫log是TRUE FALSE时。
参数:resolution
the resolution of the slider scale. If > 0, all values are rounded to an even multiple of this value. The default is 0.
的分辨率滑块规模。如果> 0,所有价值均调整到该值的偶数倍。默认值是0。
参数:action
the function which is called when the slider is moved.
移动滑块时调用的函数。
参数:title
the label of the slider.
标签的滑块。
参数:initval
the initial value of var (optional). The initial value can also be specified in the call to rp.control.
的初始值的VAR(可选)。的初始值,也可以指定在调用rp.control。
参数:parent
this specifies the widget inside which the slider should appear. In the current version of rpanel, it should not normally be used.
这指定滑块应在其内部出现的小部件。在的当前版本rpanel,通常不应使用。
参数:pos
the layout instructions. Please see the rp.pos example and help for full details.
布局说明。请看看rp.pos榜样和帮助的完整细节。
参数:horizontal
a logical variable determining whether the slider is displayed horizontally (or vertically).
一个逻辑变量确定滑块是否显示水平(或垂直)。
参数:...
information for pos can be passed individually as additional arguments.
pos的信息可以通过单独作为附加参数。
Details
详细信息----------Details----------
The function action should take one argument, which should be the panel to which the slider is attached.
函数action应该接受一个参数,这应该是面板滑块连接。
See rp.grid for details of the grid layout system.
见rp.grid的网格布局系统的详细信息。
值----------Value----------
If the parameter panel is the panelname string the same string is returned. If the panel object is used the altered panel is assigned to both the calling level and panel's environment level.
如果该参数面板是panelname的的字符串相同的字符串返回。如果面板对象是用来改变的面板被分配到的层次和面板的环境。
警告----------Warning----------
The action function should return the panel. Without this assignment any widgets added or alterations made to panel parameters within the action function will be lost.<br> <br> Note that setting log=TRUE and showvalue=TRUE is not allowed. The slider value shown would be incorrect (it wouldn't be the log value) and so showvalue is over-ridden and set to FALSE. A new widget rp.label is under development which would be used in these circumstances.
action函数应该返回面板。如果没有这个任务添加任何部件或在action功能面板参数的改变将会丢失。<br> <br>请注意,设置记录= TRUE和showvalue的的= TRUE是不允许的。滑块显示的值是不正确的(它不会是log中值)和,所以showvalue缠身的设置为false。在这种情况下,将使用一个新的Widget rp.label正在开发。
参考文献----------References----------
rpanel: Simple interactive controls for R functions using the tcltk package. Journal of Statistical Software, 17, issue 9.
参见----------See Also----------
rp.radiogroup,rp.control
rp.radiogroup,rp.control
实例----------Examples----------
if (interactive()) {
density.draw <- function(panel) {
plot(density(panel$x, bw = panel$h))
panel
}
panel <- rp.control(x = rnorm(50))
rp.slider(panel, h, 0.5, 5, log = TRUE, action = density.draw)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|