Rd2HTML(tools)
Rd2HTML()所属R语言包:tools
Rd Converters
路转换器
译者:生物统计家园网 机器人LoveR
描述----------Description----------
These functions take the output of the parse_Rd function and produce a help page from it. As they are mainly intended for internal use, their interfaces are subject to change.
这些功能parse_Rd函数的输出,并从它产生的帮助页面。它们的接口,因为它们主要用于内部使用,如有任何更改。
用法----------Usage----------
Rd2HTML(Rd, out = "", package = "", defines = .Platform$OS.type,
Links = NULL, Links2 = NULL,
stages = "render", outputEncoding = "UTF-8",
dynamic = FALSE, no_links = FALSE, fragment = FALSE,
stylesheet = "R.css", ...)
Rd2txt(Rd, out = "", package = "", defines = .Platform$OS.type,
stages = "render", outputEncoding = "",
fragment = FALSE, options, ...)
Rd2latex(Rd, out = "", defines = .Platform$OS.type,
stages = "render", outputEncoding = "ASCII",
fragment = FALSE, ..., writeEncoding = TRUE)
Rd2ex(Rd, out = "", defines = .Platform$OS.type,
stages = "render", outputEncoding = "UTF-8", ...)
参数----------Arguments----------
参数:Rd
a filename or Rd object to use as input.
文件名或Rd对象作为输入使用。
参数:out
a filename or connection object to which to write the output.
写入输出文件名或连接对象。
参数:package
the package to list in the output.
列出在输出包。
参数:defines
string(s) to use in <PRE>#ifdef</PRE> tests.
字符串(S)在<PRE>的#ifdef </ pre>测试使用。
参数:stages
at which stage ("build", "install", or "render") should <PRE>\Sexpr</PRE> macros be executed? See the notes below.
在哪个阶段("build","install"或"render")应<PRE> \ Sexpr </ pre>宏被执行?见下面的说明。
参数:outputEncoding
see the "Encodings" section below.
见“编码”一节。
参数:dynamic
logical: set links for render-time resolution by dynamic help system.
逻辑:渲染时间分辨率动态帮助系统集的链接。
参数:no_links
logical: suppress hyperlinks to other help topics. Used by R CMD Rdconv.
逻辑:压制其他帮助主题的超链接。用于R CMD Rdconv。
参数:fragment
logical: should fragments of Rd files be accepted? See the notes below.
逻辑:号文件的片段应该被接受?见下面的说明。
参数:stylesheet
character: a URL for a stylesheet to be used in the header of the HTML output page.
性格:一个要使用的HTML输出页面的标题样式的URL。
参数:Links, Links2
NULL or a named (by topics) character vector of links, as returned by findHTMLlinks.
NULL或findHTMLlinks返回的链接,命名(主题)的特征向量。
参数:options
An optional named list of options to pass to Rd2txt_options.
可选选项列表传递Rd2txt_options的。
参数:...
additional parameters to pass to parse_Rd when Rd is a filename.
额外的参数传递给parse_Rd时Rd是一个文件名。
参数:writeEncoding
should <PRE>\inputencoding</PRE> lines be written in the file for non-ASCII encodings?
应该<PRE> \ inputencoding </ pre>行写在非ASCII编码的文件?
Details
详情----------Details----------
These functions convert help documents: Rd2HTML produces HTML, Rd2txt produces plain text, Rd2latex produces LaTeX. Rd2ex extracts the examples in the format used by example and R utilities.
这些功能将帮助文件:Rd2HTML生成HTML,Rd2txt生产纯文本,Rd2latexLaTeX的产生。 Rd2ex提取用来格式example和R公用事业的例子。
Each of the functions accepts a filename for an Rd file, and will use parse_Rd to parse it before applying the conversions or checks.
每个函数接受一个号文件的文件名,将使用parse_Rd解析之前,申请转换或支票。
The difference between arguments Link and Link2 is that links are looked in them in turn, so lazy-evaluation can be used to only do a second-level search for links if required.
参数之间的差异Link和Link2是链接在看着他们反过来,所以懒惰的评价可以用来只能做第二级的搜索,如果需要的链接。
Note that the default for Rd2latex is to output ASCII,
请注意,默认的Rd2latex输出ASCII,
值----------Value----------
These functions are executed mainly for the side effect of writing the converted help page. Their value is the name of the output file (invisibly). For Rd2latex, the output name is given an attribute "latexEncoding" giving the encoding of the file in a form suitable for use with the LaTeX inputenc package.
执行这些功能,主要用于编写转换的帮助页面的副作用。他们的价值是输出文件的名称(不可见)。 Rd2latex,输出的名字被赋予一个属性"latexEncoding"文件的形式适合使用乳胶inputenc包编码。
编码----------Encodings----------
Rd files are normally intended to be rendered on a wide variety of systems, so care must be taken in the encoding of non-ASCII characters. In general, any such encoding should be declared using the encoding section for there to be any hope of correct rendering.
号文件通常是要提供各种各样的系统上,所以必须小心采取非ASCII字符的编码。在一般情况下,应宣布任何此类编码使用encoding部分是正确渲染的任何希望。
For output, the outputEncoding argument will be used: outputEncoding = "" will choose the native encoding for the current system.
outputEncoding参数输出,将用于:outputEncoding = ""会选择当前系统的本地编码。
If the text cannot be converted to the outputEncoding, byte substitution will be used (see iconv): Rd2latex and Rd2ex give a warning.
如果文字不能转换到outputEncoding,将用于字节代换(见iconv)Rd2latex和Rd2ex给予警告。
注意----------Note----------
The
“
built on 2011-12-23 at 01:10:41,
建于2011年12月23日在一点10分41秒,
installed on 2011-12-23 at 01:10:41, and
安装于2011年12月23日1点10分41秒,
rendered on 2012-02-15 at 15:14:32.
呈现于2012年2月15日15点14分32秒。
作者(S)----------Author(s)----------
Duncan Murdoch, Brian Ripley
参考文献----------References----------
<h3>See Also</h3> <code>parse_Rd</code>, <code>checkRd</code>, <code>findHTMLlinks</code>, <code>Rd2txt_options</code>.
举例----------Examples----------
## Not run: [#无法运行:]
## Simulate install and rendering of this page in HTML and text format:[#模拟安装和渲染HTML和文本格式的页面:]
Rd <- file.path("src/library/tools/man/Rd2HTML.Rd")
outfile <- tempfile(fileext = ".html")
browseURL(Rd2HTML(Rd, outfile, package = "tools",
stages = c("install", "render")))
outfile <- tempfile(fileext = ".txt")
file.show(Rd2txt(Rd, outfile, package = "tools",
stages = c("install", "render")))
checkRd(Rd) # A stricter test than Rd2HTML uses[严格的测试,比Rd2HTML使用]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|