promptClass(methods)
promptClass()所属R语言包:methods
Generate a Shell for Documentation of a Formal Class
生成的文件正式的课堂壳牌
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Assembles all relevant slot and method information for a class, with minimal markup for Rd processing; no QC facilities at present.
装配所有有关插槽和方法的一类信息,与路处理的最小标记;目前没有质量控制设施。
用法----------Usage----------
promptClass(clName, filename = NULL, type = "class",
keywords = "classes", where = topenv(parent.frame()))
参数----------Arguments----------
参数:clName
a character string naming the class to be documented.
一个字符串,命名记录的类。
参数: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 the topic name for the class documentation, followed by ".Rd". Can also be NA (see below).
通常,一个连接或给予的外壳应书面文件的文件名字符串。默认情况下对应的文件的名称是类文档的主题名称,".Rd"。也可以NA(见下文)。
参数:type
the documentation type to be declared in the output file.
在输出文件中的文件类型被宣布。
参数:keywords
the keywords to include in the shell of the documentation. The keyword "classes" should be one of them.
关键字包括在文件的外壳。关键字"classes"应该是其中之一。
参数:where
where to look for the definition of the class and of methods that use it.
到哪里寻找类的定义和使用它的方法。
Details
详情----------Details----------
The class definition is found on the search list. Using that definition, information about classes extended and slots is determined.
类定义的搜索列表。使用该定义,扩展类和插槽的信息是确定的。
In addition, the currently available generics with methods for this class are found (using getGenerics). Note that these methods need not be in the same environment as the class definition; in particular, this part of the output may depend on which packages are currently in the search list.
此外,使用这个类的方法,目前可用的泛型被发现(使用getGenerics)。请注意,这些方法不需要类定义在相同的环境,特别是这部分的输出可能取决于哪些软件包是目前在搜索列表。
As with other prompt-style functions, unless filename is NA, the documentation shell is written to a file, and a message about this is given. The file will need editing to give information about the meaning of the class. The output of promptClass can only contain information from the metadata about the formal definition and how it is used.
与其他风格的提示功能,除非filenameNA,文件的外壳被写入到一个文件,有关此消息。该文件将需要编辑类的含义的信息。的promptClass输出只能包含正式的定义,并从元数据信息,如何使用它。
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是列表式的代表性。
值----------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,文档壳的列表风格的代表。否则,写入该文件的名称返回无形。
作者(S)----------Author(s)----------
VJ Carey <a href="mailto:stvjc@channing.harvard.edu">stvjc@channing.harvard.edu</a> and John Chambers
参考文献----------References----------
Software for Data Analysis: Programming with R Springer. (For the R version.)
Programming with Data Springer (For the original S4 version.)
参见----------See Also----------
prompt for documentation of functions, promptMethods for documentation of method definitions.
prompt函数的文档,promptMethods方法定义的文件。
For processing of the edited documentation, either use R CMD Rdconv, or include the edited file in the "man" subdirectory of a package.
编辑的文档处理,可以使用R CMD Rdconv,或man包的子目录包括编辑文件。
举例----------Examples----------
## Not run: > promptClass("track")[#无法运行:> promptClass(“跟踪”)]
A shell of class documentation has been written to the
file "track-class.Rd".
## End(Not run)[#结束(不运行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|