bibstyle(tools)
bibstyle()所属R语言包:tools
Select or define a bibliography style.
选择或定义一个书目样式。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function defines and registers styles for rendering bibentry objects into Rd format, for later conversion to text, HTML, etc.
此功能寄存器的定义和渲染成Rd格式bibentry对象的样式,后来转换为文本,HTML等
用法----------Usage----------
bibstyle(style, envir, ..., .init = FALSE, .default = FALSE)
参数----------Arguments----------
参数:style
A character string naming the style.
一个字符串,命名风格。
参数:envir
(optional) An environment holding the functions to implement the style.
(可选)环境控股的功能来实现的风格。
参数:...
Named arguments to add to the environment.
命名参数添加到环境。
参数:.init
Whether to initialize the environment from the default style "JSS".
是否要初始化的默认样式"JSS"环境。
参数:.default
Whether to set the specified style as the default style.
是否设置了指定的样式作为默认样式。
Details
详情----------Details----------
Rendering of bibentry objects may be done using routines modelled after those used by BibTeX. This function allows environments to be created and manipulated to contain those routines.
渲染bibentry对象可以使用后的BibTEX使用的建模例程。此功能允许环境创建和操纵包含这些例程。
There are two ways to create a new style environment. The easiest is to set .init = TRUE, in which case the environment will be initialized with a copy of the default "JSS" environment. (This style is modelled after the "jss.bst" style used by the Journal of Statistical Software.) Alternatively, the envir argument can be used to specify a completely new style environment.
有两种方法来创建一个新的风格的环境。最简单的方法是设置.init = TRUE,环境,在这种情况下,将初始化默认"JSS"环境的一个副本。 (这种风格为蓝本后jss.bst统计软件杂志的风格。)另外,envir参数可以用来指定一个完全新的风格的环境。
To simply retrieve an existing style, specify style and no other arguments. To modify an existing style, specify style and some named entries via .... (Modifying the default "JSS" style is discouraged.) Setting style to NULL or leaving it missing will retrieve the default style, but modifications will not be allowed.
简单地检索现有的样式,指定style“没有其他的参数。修改现有的样式,指定style和一些通过...命名的条目。 (修改默认"JSS"风格气馁。)设置styleNULL或离开它缺少将检索默认的风格,但将不允许修改。
At a minimum, the environment should contain routines to render each of the 12 types of bibliographic entry supported by bibentry as well as a routine to produce a sort key to sort the entries. The former must be named formatArticle, formatBook, formatInbook, formatIncollection, formatInProceedings, formatManual, formatMastersthesis, formatMisc, formatPhdthesis, formatProceedings, formatTechreport and formatUnpublished. Each of these takes one argument, a single unclass'ed entry from the bibentry vector passed to the renderer, and should produce a single element character vector (possibly containing newlines). The sort keys are produced by a function named sortKeys. It is passed the original bibentry vector and should produce a sortable vector of the same length to define the sort order.
在最低限度,环境应包含例程,以使每个支持12种书目条目bibentry以及日常生产排序键的条目进行排序。前者必须命名为formatArticle,formatBook,formatInbook,formatIncollection,formatInProceedings,formatManual,formatMastersthesis,<X >,formatMisc,formatPhdthesis,formatProceedings和formatTechreport。这些都需要一个参数,一个单一的formatUnpublishedEDunclass向量条目传递给渲染,应该产生一个单一的元素特征向量(可能包含换行符)。排序键是由名为bibentry函数。它是通过原sortKeys向量,应该产生一个相同长度的排序向量来定义排序顺序。
值----------Value----------
The environment which has been selected or created.
的环境,已被选定或创建。
作者(S)----------Author(s)----------
Duncan Murdoch
参见----------See Also----------
bibentry
bibentry
举例----------Examples----------
refs <-
c(bibentry(bibtype = "manual",
title = "R: A Language and Environment for Statistical Computing",
author = person("R Development Core Team"),
organization = "R Foundation for Statistical Computing",
address = "Vienna, Austria",
year = 2010,
isbn = "3-900051-07-0",
url = "http://www.R-project.org"),
bibentry(bibtype = "article",
author = c(person(c("George", "E", "P"), "Box"),
person(c("David", "R"), "Cox")),
year = 1964,
title = "An Analysis of Transformations",
journal = "Journal of the Royal Statistical Society, Series B",
volume = 26,
pages = "211-252"))
bibstyle("unsorted", sortKeys = function(refs) seq_along(refs),
.init = TRUE)
print(refs, .bibstyle = "unsorted")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|