Learn R Programming

RefManageR (version 1.4.0)

RelistBibEntry: Flatten and unflatten BibEntry objects

Description

RelistBibEntry unflattens a BibEntry object that has been flattened with unlist.

unlist flattens a BibEntry object to a single list where every field (including bibtype and key) of every entry is a separate element in the list.

Usage

RelistBibEntry(flesh, skeleton = NULL)

# S3 method for BibEntry unlist(x, recursive = FALSE, use.names = TRUE)

Value

RelistBibEntry - an object of class BibEntry

For unlist, a list with bib entries collapsed into a single list.

Arguments

flesh

list; an unlisted BibEntry object

skeleton

currently ignored

x

a BibEntry object to flatten

recursive

ignored.

use.names

ignored.

Details

RelistBibEntry is only intended for use with unlisted BibEntry objects.

See Also

as.BibEntry

Examples

Run this code
bib <- list(c(bibtype = "article", key = "mclean2014a", title = "My New Article",
  author = "Mathew W. McLean", journaltitle = "The Journal", date = "2014-01"),
  c(bibtype = "article", key = "mclean2014b", title = "My Newer Article",
  author = "Mathew W. McLean", journaltitle = "The Journal", date = "2014-02"))
bib <- as.BibEntry(bib)
unlist(bib)
RelistBibEntry(unlist(bib))

Run the code above in your browser using DataLab