promptPackage(utils)
promptPackage()所属R语言包:utils
Generate a Shell for Documentation of a Package
生成一个文件包壳
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Generates a shell of documentation for an installed or source package.
生成的文件安装或源码包壳。
用法----------Usage----------
promptPackage(package, lib.loc = NULL, filename = NULL,
name = NULL, final = FALSE)
参数----------Arguments----------
参数:package
a character string with the name of an installed or source package to be documented.
character串用源码包安装或记录的名称。
参数:lib.loc
a character vector describing the location of R library trees to search through, or NULL. The default value of NULL corresponds to all libraries currently known. For a source package this should specify the parent directory of the package's sources.
字符向量描述R库树的位置,通过搜索,或NULL。默认值的NULL对应于目前已知的所有库。这对于源包应指定包的源的父目录。
参数:filename
usually, a connection or a character string giving the name of the file to which the documentation shell should be written. The default corresponds to a file whose name is name followed by ".Rd". Can also be NA (see below).
通常,一个连接或给予的外壳应书面文件的文件名字符串。默认对应一个文件,其名称是,name".Rd"其次。也可以NA(见下文)。
参数:name
a character string specifying the name of the help topic, typically of the form <pkg>-package.
一个字符串指定的帮助主题的名称,通常的形式<pkg>-package。
参数:final
a logical value indicating whether to attempt to create a usable version of the help topic, rather than just a shell.
指示是否试图创建一个可用的帮助主题的版本,而不是只是一个空壳,一个逻辑值。
Details
详情----------Details----------
Unless filename is NA, a documentation shell for package is written to the file specified by filename, and a message about this is given.
除非filename是NA,一个文档壳package是书面到filename指定的文件,并给予有关此消息。
If filename is NA, a list-style representation of the documentation shell is created and returned. Writing the shell to a file amounts to cat(unlist(x), file = filename, sep = "\n"), where x is the list-style representation.
如果filename是NA,文档壳的列表式表示创建并返回。 shell来编写一个文件,相当于cat(unlist(x), file = filename, sep = "\n"),其中x是列表式的代表性。
If final is TRUE, the generated documentation will not include the place-holder slots for manual editing, it will be usable as-is. In most cases a manually edited file is preferable (but final = TRUE is certainly less work).
如果final是TRUE,生成的文件将不包括手动编辑的地方人插槽,它会是有用的作为。在大多数情况下,手动编辑的文件是最好的(但final = TRUE是肯定少的工作)。
值----------Value----------
If filename is NA, a list-style representation of the documentation shell. Otherwise, the name of the file written to is returned invisibly.
如果filename是NA,文档壳的列表风格的代表。否则,写入该文件的名称返回无形。
参见----------See Also----------
prompt
prompt
举例----------Examples----------
filename <- tempfile()
promptPackage("utils", filename = filename)
file.show(filename)
unlink(filename)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|