ropensci/bib2df

Name: bib2df

Owner: rOpenSci

Description: Parse a BibTeX file to a tibble

Created: 2016-07-30 21:47:24.0

Updated: 2018-01-09 08:43:38.0

Pushed: 2018-01-07 17:59:20.0

Homepage:

Size: 103

Language: R

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

CRAN\_Status\_Badge Travis-CI Build Status Build status codecov

bib2df - Parse a BibTeX file to a tibble

Everyone writing reports and articles with LaTeX has probably used BibTeX before. BibTeX is the de facto standard for reference management and grounds its functionality on a list of references stored in local text file. Depending on the reference type, several fields are necessary to define a reference properly. An exemplary BibTeX entry looks as follows:

@Article{Binmore2008,
  Title = {Do Conventions Need to Be Common Knowledge?},
  Author = {Binmore, Ken},
  Journal = {Topoi},
  Year = {2008},
  Number = {1},
  Pages = {17--27},
  Volume = {27}
}
Parse the BibTeX file to a tibble

The BibTeX format is not convenient for any kind of analysis or visualization. Many R applications require a data.frame (or tibble) and bib2df offers a straightforward framework to parse a BibTeX file to a tibble.

ary(bib2df)
 <- system.file("extdata", "biblio.bib", package = "bib2df")
<- bib2df(path)

 A tibble: 3 x 26
     CATEGORY              BIBTEXKEY  ADDRESS ANNOTE    AUTHOR
        <chr>                  <chr>    <chr>  <chr>    <list>
      ARTICLE            Binmore2008     <NA>   <NA> <chr [1]>
         BOOK            Osborne1994     <NA>   <NA> <chr [2]>
 INCOLLECTION BrandenburgerDekel1989 New York   <NA> <chr [2]>
 ... with 21 more variables: BOOKTITLE <chr>, CHAPTER <chr>,
   CROSSREF <chr>, EDITION <chr>, EDITOR <list>, HOWPUBLISHED <chr>,
   INSTITUTION <chr>, JOURNAL <chr>, KEY <chr>, MONTH <chr>, NOTE <chr>,
   NUMBER <chr>, ORGANIZATION <chr>, PAGES <chr>, PUBLISHER <chr>,
   SCHOOL <chr>, SERIES <chr>, TITLE <chr>, TYPE <chr>, VOLUME <chr>,
   YEAR <dbl>

The df2bib() function makes it possible to write this tibble back to disk, enabling programmatic manipulation of a .bib file.

Installation

The latest version of bib2df can be installed from GitHub using devtools::install_github():

devtools::install_github("ottlngr/bib2df")

Version 1.0.0 is now available on CRAN:

install.packages("bib2df")
Community Guidelines

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.


ropensci\_footer


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.