head.BibEntry | R Documentation |
Prints the first or last entries of a BibEntry object (via message
) and returns them invisibly
(via invisible
).
## S3 method for class 'BibEntry'
head(x, n = 6L, suppress.messages = TRUE, ...)
## S3 method for class 'BibEntry'
tail(x, n = 6L, suppress.messages = TRUE, ...)
x |
an object of class BibEntry. |
n |
a single integer. If positive, size for the resulting object: number of elements for a vector (including lists), rows for a matrix or data frame or lines for a function. If negative, all but the n last/first number of elements of x. |
suppress.messages |
boolean; should the head/tail entries be printed via |
... |
arguments to be passed to or from other methods. |
If suppress.messages
is FALSE
, the head/tail entries are output to the console along
with some additional formatting for the ‘bibtype’ and ‘key’, in addition to
invisibly returning the entries.
an object of class BibEntry.
if (requireNamespace("bibtex")) {
file <- system.file("Bib", "biblatexExamples.bib", package = "RefManageR")
BibOptions(check.entries = FALSE)
bib <- ReadBib(file)
tail(bib, 2, suppress.messages = FALSE)
bib <- head(bib, 1, suppress.messages = TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.