help(utils)
help()所属R语言包:utils
Documentation
文档
译者:生物统计家园网 机器人LoveR
描述----------Description----------
help is the primary interface to the help systems.
help是主接口,以帮助系统。
用法----------Usage----------
help(topic, package = NULL, lib.loc = NULL,
verbose = getOption("verbose"),
try.all.packages = getOption("help.try.all.packages"),
help_type = getOption("help_type"))
参数----------Arguments----------
参数:topic
usually, a name or character string specifying the topic for which help is sought. A character string (enclosed in explicit single or double quotes) is always taken as naming a topic. If the value of topic is a length-one character vector the topic is taken to be the value of the only element. Otherwise topic must be a name or a reserved word (if syntactically valid) or character string. See "Details" for what happens if this is omitted.
通常,一个名称或字符串指定其帮助主题的追捧。一个字符串(明确的单或双引号括起来)总是被命名一个主题。如果topic价值是一个长度为一个字符向量的主题是唯一的元素值。否则topic必须是一个名称或保留字(如语法上有效)或字符串。会发生什么情况如果省略此,请参阅“详细资料”。
参数:package
a name or character vector giving the packages to look into for documentation, or NULL. By default, all packages in the search path are used. To avoid a name being deparsed use e.g. (pkg_ref) (see the examples).
让寻找文件的包的名称或特征向量,或NULL。默认情况下,用于在搜索路径中的所有包。为了避免名称deparsed使用,例如(pkg_ref)(见例子)。
参数: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. This is not used for HTML help (see "Details".
特征向量的研发图书馆的目录名,或NULL。默认值的NULL对应于目前已知的所有库。如果使用默认值,装包库前搜索。这是用于HTML帮助(见“详细资料”。
参数:verbose
logical; if TRUE, the file name is reported.
逻辑;如果TRUE,文件名被报道。
参数:try.all.packages
logical; see Note.
逻辑;看到Note。
参数:help_type
character string: the type of help required. Possible values are "text", "html" and "pdf". Case is ignored, and partial matching is allowed. Values "postscript" and "ps" are deprecated and will be removed in the near future.
字符串类型所需的帮助。可能值"text","html"和"pdf"。被忽略的情况下,并允许部分匹配。值"postscript"和"ps"被弃用,将在不久的将来中删除。
Details
详情----------Details----------
The following types of help are available:
帮助中的下列类型:
Plain text help
纯文本的帮助
HTML help pages with hyperlinks to other topics, shown in a browser by browseURL. If for some reason HTML help is unavailable (see startDynamicHelp), plain text help will be used instead.
HTML帮助页面与其他主题的超链接,在浏览器中显示browseURL。如果由于某种原因,HTML帮助不可用(见startDynamicHelp),纯文本的帮助下将被用来代替。
For help only, typeset as a PDF or PostScript file – see the section on "Offline help".
help只,排版的PDF或PostScript文件 - “离线帮助”一节。
The default for the type of help is selected when R is installed – the "factory-fresh" default is HTML help.
帮助类型的默认安装时选择R是 - “工厂新鲜的默认HTML帮助。
The rendering of text help will use directional quotes in suitable locales (UTF-8 and single-byte Windows locales): sometimes the fonts used do not support these quotes so this can be turned off by setting options(useFancyQuotes = FALSE).
帮助文本的渲染将在合适的语言环境中使用定向引号(UTF-8和单字节的Windows区域设置):有时使用的字体不支持这些引号,所以这可以通过设置options(useFancyQuotes = FALSE)。
topic is not optional: if it is omitted R will give
topic是不可选的:如果它被省略R将给予
If a package is specified, (text or, in interactive use only, HTML) information on the package, including hints/links to suitable help topics.
如果指定一个包,包(文本或仅在交互使用,HTML)信息,包括提示/链接到适当的帮助主题。
If lib.loc only is specified, a (text) list of available packages.
如果lib.loc只指定一个可用的软件包列表(文字)。
Help on help itself if none of the first three arguments is specified.
帮助help如果没有指定前三个参数。
Some topics need to be quoted (by backticks) or given as a character string. These include those which cannot syntactically appear on their own such as unary and binary operators, function and control-flow reserved words (including if, else for, in, repeat, while, break and next). The other reserved words can be used as if they were names, for example TRUE, NA and Inf.
有些议题需要被引用(反引号)或字符串。这些措施包括语法不能对自己的出现,例如一元和二元运算符,function和控制流的保留字(包括if,elsefor,<X >,in,repeat,while和break)。其他next的话,如果他们可以使用的名称,例如,reserved,TRUE和NA。
If multiple help files matching topic are found, in interactive use a menu is presented for the user to choose one: in batch use the first on the search path is used. (For HTML help the menu will be an HTML page, otherwise a graphical menu if possible if getOption("menu.graphics") is true, the default.)
如果多个帮助文件匹配topic被发现,在交互使用菜单为用户选择一个:批量使用的搜索路径上使用第一。 (对于HTML帮助菜单将一个HTML页面,否则getOption("menu.graphics")如果是真实的,默认一个图形化的菜单,如果可能的话。)
Note that HTML help does not make use of lib.loc: it will always look first in the attached packages and then along .libPaths().
请注意,HTML帮助,不使用lib.loc:它总是会在附加软件包,然后沿.libPaths()。
离线帮助----------Offline help----------
Typeset documentation is produced by running the LaTeX version of the help page through pdflatex or (deprecated) latex and dvips. This will produce a PDF or PostScript file and possibly (depending on the configuration of dvips) send a PostScript file to a printer.
文档排版制作运行通过pdflatex(已过时)latex和dvips帮助页面LaTeX的版本。这将产生一个PDF或PostScript文件,并可能(取决于配置dvips)发送到打印机的PostScript文件。
The appearance of the output can be customized through a file "Rhelp.cfg" somewhere in your LaTeX search path: this will be input as a LaTeX style file after Rd.sty. Some environment variables are consulted, notably R_PAPERSIZE (via getOption("papersize")) and R_RD4PDF (see "Making manuals" in the "R Installation and Administration Manual").
输出的外观可以通过定制文件Rhelp.cfg的地方在你的LaTeX的搜索路径:这将是一个LaTeX风格文件输入后Rd.sty。一些环境变量的意见,尤其是R_PAPERSIZE(通过getOption("papersize"))R_RD4PDF“R安装和管理手册”(见“手册”)。
If there is a function offline_help_helper in the workspace or further down the search path it is used to do the typesetting, otherwise the function of that name in the utils namespace (to which the first paragraph applies). It should accept at least two arguments, the name of the LaTeX file to be typeset and the type. As from R 2.14.0 it should accept a third argument, texinputs, which will give the graphics path when the help document contains figures, and will otherwise not be supplied.
如果有一个函数offline_help_helper在工作区或进一步缩小搜索路径,它是用来做排版,否则这个名字utils命名空间(适用第一款)的功能。它应接受至少两个参数,排版LaTeX文件名称和类型。从R 2.14.0应该接受第三个参数,texinputs,这将给图形路径时,帮助文档中包含的数字,否则将无法提供。
PostScript rendering of help pages containing figures will often not include the figures (which is one reason it is deprecated).
PostScript的帮助页包含数字渲染,往往会不包括数字(这是原因之一,它已过时)。
注意----------Note----------
Unless lib.loc is specified explicitly, the loaded packages are searched before those in the specified libraries. This ensures that if a library is loaded from a library not in the known library trees, then the help from the loaded library is used. If lib.loc is specified explicitly, the loaded packages are not searched.
除非lib.loc明确指定,装包搜查之前,那些在指定的图书馆。这将确保,如果从没有在已知的库树库加载库,然后从加载库的帮助下使用。如果lib.loc明确指定,装包搜查。
If this search fails and argument try.all.packages is TRUE and neither packages nor lib.loc is specified, then all the packages in the known library trees are searched for help on topic and a list of (any) packages where help may be found is displayed (with hyperlinks for help_type = "html"). <STRONG>NB:</STRONG> searching all packages can be slow, especially the first time (caching of files by the OS can expedite subsequent searches dramatically).
如果搜索失败和参数try.all.packages是TRUE“既不packages也lib.loc被指定,则称为库树中的所有包帮助搜索<X >和(任何)可能会发现帮助的套件列表显示(topic超链接“)。 <STRONG>注:</强>搜索所有的包可能会很慢,尤其是第一次(由操作系统的文件缓存,可显着加快后续搜索)。
参考文献----------References----------
The New S Language. Wadsworth & Brooks/Cole.
参见----------See Also----------
? for shortcuts to help topics.
?快捷键的帮助主题。
help.search() or ?? for finding help pages on a vague topic; help.start() which opens the HTML version of the R help pages; library() for listing available packages and the help objects they contain; data() for listing available data sets; methods().
help.search()或??寻找帮助页面上的含糊不清的话题;help.start()打开HTML版本的R帮助页面;library()列出可用的软件包和帮助对象包含; data()列出可用的数据集,“methods()。
Use prompt() to get a prototype for writing help pages of your own package.
使用prompt()得到原型编写help自己包的页面。
举例----------Examples----------
help()
help(help) # the same[同一]
help(lapply)
help("for") # or ?"for", but quotes/backticks are needed[?“为”,但报价/反引号需要]
help(package="splines") # get help even when package is not loaded[得到帮助,甚至当包不加载]
topi <- "women"
help(topi)
try(help("bs", try.all.packages=FALSE)) # reports not found (an error)[没有发现报告(错误)]
help("bs", try.all.packages=TRUE) # reports can be found[报告可以被发现]
# in package 'splines'[在一揽子“样条线”]
## For programmatic use:[#纲领性使用:]
topic <- "family"; pkg_ref <- "stats"
help((topic), (pkg_ref))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|