listSelect(tkWidgets)
listSelect()所属R语言包:tkWidgets
Utilities Creating a Widget With Selection Boxes
实用程序创建一个选择框部件
译者:生物统计家园网 机器人LoveR
描述----------Description----------
These functions create a widget with selection boxes allowing users to view and make selections of items shown on the interface.
这些功能创建一个选择框,允许用户查看和界面上显示的项目作出选择的部件。
用法----------Usage----------
listSelect(aList, topLbl = "Select Elements From The Following List",
typeFun = stdType, valueFun = stdView)
writeSelBox(baseW, aList, typeFun = NULL, valueFun = NULL)
writeBut(baseW, butList, butWidth = 6)
writeLabel(baseW, typeFun, valueFun)
参数----------Arguments----------
参数:aList
list with names and object pairs (e. g. a = "AAA").
列表名称和对象对(如“a = "AAA")。
参数:topLbl
character string for the text to be shown as a title.
要显示字符的文本字符串作为标题。
参数:typeFun
function that takes an R object as an arguement and returns a description of the object.
功能作为一个arguement R对象,并返回一个对象的描述。
参数:valueFun
function that takes an R object as an argument and shows the content of the object. The function should get the representation of the object and calls objViewer to have the representation rendered in a widget.
函数作为参数R对象和显示对象的内容。该功能应该得到对象的代表性调用objViewer有一个部件呈现的代表性。
参数:baseW
a window widget to which the selection boxes will be put.
一个窗口部件的选择框将付诸表决。
参数:butList
a list with names and function pairs that define the name and behavior of buttons to be put on the widget to be generated
与列表定义按钮的名称和行为将要产生的部件名称和功能对
参数:butWidth
numerical value specifying the width of buttons to be created.
数值指定要创建的按钮的宽度。
Details
详情----------Details----------
Both typeFun and valueFun have to take an argument (the R object to be shown). It works well for the valueFun function to call objViewer() with whatever to be shown passed to objViewer as an argument.
既typeFun和valueFun必须采取一个参数(R对象)。它的工作原理为valueFun函数调用objViewer()有什么要显示作为一个参数传递到objViewer。
值----------Value----------
listSelect() returns a list with the names of the R objects in the original list associated with TRUE (selected) or FALSE (deselected).
listSelect()TRUE(选中)或FALSE(取消选择)相关的原始列表中的R对象的名称返回一个列表。
作者(S)----------Author(s)----------
Jianhua Zhang
参见----------See Also----------
objViewer
objViewer
举例----------Examples----------
aList <- list(a = "AAA", b = c(123, 456, 789),
c = as.data.frame(matrix(1:10, ncol = 2)),
d = stdType)
# Since user interference is required, the example code does not run[由于用户干扰是必需的,例如代码不运行]
# automatically[自动]
if(interactive())
listSelect(aList)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|