Skip to content
Prev 302469 / 398506 Next

bibtex::read.bib -- extracting bibentry keys

On Mon, 6 Aug 2012, Michael Friendly wrote:

            
read.bib() returns a "bibentry" object so you can simply do this as usual
for "bibentry" objects with $key:

x <- read.bib(...)
x$key

or maybe

unlist(x$key)

Whatever is more convenient for you. See ?bibentry for more details.
Also not really an issue with read.bib itself. read.bib() wants to return 
a "bibentry" object but bibentry() just allows to create objects that are 
valid BibTeX, i.e., have all required fields.
So that only a subset of fields is read as opposed to all fields?

If you read all fields, you can easily subset afterwards (again using 
$-notation).

hth,
Z