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

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

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

                                        Menu Interaction Function
                                         菜单交互功能

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

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

menu presents the user with a menu of choices labelled from 1 to the number of choices.  To exit without choosing an item one can select 0.
menu介绍了与用户的选择标记的选择从1到菜单。退出而不选择一个项目,可以选择0。


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


menu(choices, graphics = FALSE, title = NULL)



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

参数:choices
a character vector of choices
特征向量的选择


参数:graphics
a logical indicating whether a graphics menu should be used if available.
逻辑指示是否应使用图形菜单,如果可用。


参数:title
a character string to be used as the title of the menu. NULL is also accepted.
字符串被用作菜单标题。 NULL也是可以接受的。


Details

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

If graphics = TRUE and a windowing system is available (Windows, Mac OS X or X11 via Tcl/Tk) a listbox widget is used, otherwise a text menu.  It is an error to use menu in a non-interactive session.
如果graphics = TRUE“窗口系统是可用的(在Windows,Mac OS X或通过Tcl / Tk的X11的)一个ListBox部件使用,否则一个文本菜单。这是一个错误使用menu在一个非交互式会话。

Ten or fewer items will be displayed in a single column, more in multiple columns if possible within the current display width.
10个或更少的项目将显示在单个列,多列,如果可能的话在当前的显示宽度。

No title is displayed if title is NULL or "".
如果title是NULL或""无标题显示。


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

The number corresponding to the selected item, or 0 if no choice was made.
选定的项目,或0对应的数字,如果没有选择了。


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

The New S Language. Wadsworth & Brooks/Cole.

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

select.list, which is used to implement the graphical menu, and allows multiple selections.
select.list,这是用来实现图形菜单,并允许多个选择。


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


## Not run: [#无法运行:]
switch(menu(c("List letters", "List LETTERS")) + 1,
       cat("Nothing done\n"), letters, LETTERS)

## End(Not run)[#结束(不运行)]

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


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

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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