knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
bib2df
- Parse a BibTeX file to a tibbleEveryone 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} }
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
.
library(bib2df) path <- system.file("extdata", "LiteratureOnCommonKnowledgeInGameTheory.bib", package = "bib2df") df <- bib2df(path) df
The df2bib()
function makes it possible to write this tibble
back to disk, enabling programmatic manipulation of a .bib file.
The latest version of bib2df
can be installed from GitHub using devtools::install_github()
:
devtools::install_github("ropensci/bib2df")
Version 1.1.1 is now available on CRAN:
install.packages("bib2df")
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.