formatDL(base)
formatDL()所属R语言包:base
Format Description Lists
格式说明列表
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Format vectors of items and their descriptions as 2-column tables or LaTeX-style description lists.
项目和2列的表或的乳胶风格描述名单及其说明的格式矢量。
用法----------Usage----------
formatDL(x, y, style = c("table", "list"),
width = 0.9 * getOption("width"), indent = NULL)
参数----------Arguments----------
参数:x
a vector giving the items to be described, or a list of length 2 or a matrix with 2 columns giving both items and descriptions.
提供一个矢量,被描述的项目,或长度为2或2列,给这两个项目,并描述矩阵列表。
参数:y
a vector of the same length as x with the corresponding descriptions. Only used if x does not already give the descriptions.
x与相应的描述相同长度的向量。只用了如果x不已经给予说明。
参数:style
a character string specifying the rendering style of the description information. If "table", a two-column table with items and descriptions as columns is produced (similar to Texinfo's <PRE>@table</PRE> environment. If "list", a LaTeX-style tagged description list is obtained.
一个字符串,指定描述信息的渲染风格。 "table"如果,与两列的表列的项目和描述产生(类似的Texinfo的<PRE> @表</ pre>环境。如果"list",乳胶风格的标签说明列表获得。
参数:width
a positive integer giving the target column for wrapping lines in the output.
一个正整数,使包装在输出线的目标列。
参数:indent
a positive integer specifying the indentation of the second column in table style, and the indentation of continuation lines in list style. Must not be greater than width/2, and defaults to width/3 for table style and width/9 for list style.
一个正整数,指定缩进,在第二列的表样式和列表样式续行的缩进。绝不能比width/2,默认为width/3表样式和列表样式width/9。
Details
详情----------Details----------
After extracting the vectors of items and corresponding descriptions from the arguments, both are coerced to character vectors.
解压后的项目和相应的参数描述的向量,都强制为特征向量。
In table style, items with more than indent - 3 characters are displayed on a line of their own.
在表格样式,以上项目indent - 3字符显示自己的线路上。
值----------Value----------
a character vector with the formatted entries.
特征向量与格式化条目。
举例----------Examples----------
## Use R to create the 'INDEX' for package 'splines' from its 'CONTENTS'[#使用R创建包“样条线”,从它的“内容”索引“]
x <- read.dcf(file = system.file("CONTENTS", package = "splines"),
fields = c("Entry", "Description"))
x <- as.data.frame(x)
writeLines(formatDL(x$Entry, x$Description))
## or equivalently: writeLines(formatDL(x))[#或等价:writeLines(formatDL(X))]
## Same information in tagged description list style:[#相同的信息在标签的说明列表样式:]
writeLines(formatDL(x$Entry, x$Description, style = "list"))
## or equivalently: writeLines(formatDL(x, style = "list"))[#或等价:writeLines(formatDL(X,风格=“名单”))]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|