demo(utils)
demo()所属R语言包:utils
Demonstrations of R Functionality
示威R功能
译者:生物统计家园网 机器人LoveR
描述----------Description----------
demo is a user-friendly interface to running some demonstration R scripts. demo() gives the list of available topics.
demo是一个友好的用户界面以运行一些示范ŕ脚本。 demo()给可用的主题列表。
用法----------Usage----------
demo(topic, package = NULL, lib.loc = NULL,
character.only = FALSE, verbose = getOption("verbose"),
echo = TRUE, ask = getOption("demo.ask"))
参数----------Arguments----------
参数:topic
the topic which should be demonstrated, given as a name or literal character string, or a character string, depending on whether character.only is FALSE (default) or TRUE. If omitted, the list of available topics is displayed.
应展示主题,作为一个名称或文字字符串,或一个字符串,取决于是否character.only是FALSE(默认)或TRUE。如果省略,则显示所有可用的主题列表。
参数:package
a character vector giving the packages to look into for demos, or NULL. By default, all packages in the search path are used.
字符向量软件包用于演示,或NULL。默认情况下,用于在搜索路径中的所有包。
参数:lib.loc
a character vector of directory names of R libraries, or NULL. The default value of NULL corresponds to all libraries currently known. If the default is used, the loaded packages are searched before the libraries.
特征向量的研发图书馆的目录名,或NULL。默认值的NULL对应于目前已知的所有库。如果使用默认值,装包库前搜索。
参数:character.only
logical; if TRUE, use topic as character string.
逻辑;如果TRUE用topic字符串。
参数:verbose
a logical. If TRUE, additional diagnostics are printed.
一个逻辑。如果TRUE,印有额外的诊断。
参数:echo
a logical. If TRUE, show the R input when sourcing.
一个逻辑。如果TRUE,采购时显示R输入。
参数:ask
a logical (or "default") indicating if devAskNewPage(ask=TRUE) should be called before graphical output happens from the demo code. The value "default" (the factory-fresh default) means to ask if echo == TRUE and the graphics device appears to be interactive. This parameter applies both to any currently opened device and to any devices opened by the demo code. If this is evaluated to TRUE and the session is interactive, the user is asked to press RETURN to start.
逻辑(或"default")devAskNewPage(ask=TRUE)如果应该被称为图形输出前发生的演示代码。值"default"(新鲜出厂默认)意味着要问,如果echo == TRUE和图形设备似乎是互动的。此参数适用于当前打开的任何设备和演示代码打开任何设备。如果这种评估TRUE“的会议是互动的,用户将被要求按回车键开始。
Details
详情----------Details----------
If no topics are given, demo lists the available demos. The corresponding information is returned in an object of class "packageIQR".
如果没有给出主题,demo列出了可用的演示。相应的信息中返回一个对象类"packageIQR"。
参见----------See Also----------
source and devAskNewPage which are called by demo.
source和devAskNewPage称为demo。
举例----------Examples----------
demo() # for attached packages[附加软件包]
## All available demos:[#所有可用的演示:]
demo(package = .packages(all.available = TRUE))
## Display a demo, pausing between pages[#显示的演示,网页之间暂停]
demo(lm.glm, package="stats", ask=TRUE)
## Display it without pausing[#显示不停顿]
demo(lm.glm, package="stats", ask=FALSE)
## Not run: [#无法运行:]
ch <- "scoping"
demo(ch, character = TRUE)
## End(Not run)[#结束(不运行)]
## Find the location of a demo[#寻找一个演示的位置。]
system.file("demo", "lm.glm.R", package="stats")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|