Package: bib2df 1.1.2.0

Gianluca Baio

bib2df: Parse a BibTeX File to a Data Frame

Parse a BibTeX file to a data.frame to make it accessible for further analysis and visualization.

Authors:Philipp Ottolinger [aut], Thomas Leeper [ctb], Maëlle Salmon [ctb], Paul Egeler [ctb], Emilio Xavier Esposito [ctb], Gianluca Baio [ctb, cre]

bib2df_1.1.2.0.tar.gz
bib2df_1.1.2.0.zip(r-4.5)bib2df_1.1.2.0.zip(r-4.4)bib2df_1.1.2.0.zip(r-4.3)
bib2df_1.1.2.0.tgz(r-4.5-any)bib2df_1.1.2.0.tgz(r-4.4-any)bib2df_1.1.2.0.tgz(r-4.3-any)
bib2df_1.1.2.0.tar.gz(r-4.5-noble)bib2df_1.1.2.0.tar.gz(r-4.4-noble)
bib2df_1.1.2.0.tgz(r-4.4-emscripten)bib2df_1.1.2.0.tgz(r-4.3-emscripten)
bib2df.pdf |bib2df.html
bib2df/json (API)
NEWS

# Install 'bib2df' in R:
install.packages('bib2df', repos = c('https://ropensci.r-universe.dev', 'https://cloud.r-project.org'))

Reviews:rOpenSci Software Review #124

Bug tracker:https://github.com/ropensci/bib2df/issues20 issues

Pkgdown site:https://docs.ropensci.org

On CRAN:bib2df-1.1.2.0(2024-05-16)

Conda:r-bib2df-1.1.2.0(2025-03-25)

bibtexpeer-reviewed

9.82 score 101 stars 6 packages 212 scripts 1.3k downloads 2 exports 27 dependencies

Last updated 8 months agofrom:b77eda967b (on main). Checks:9 OK. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKMar 14 2025
R-4.5-winOKMar 14 2025
R-4.5-macOKMar 14 2025
R-4.5-linuxOKMar 14 2025
R-4.4-winOKMar 14 2025
R-4.4-macOKMar 14 2025
R-4.4-linuxOKMar 14 2025
R-4.3-winOKMar 14 2025
R-4.3-macOKMar 14 2025

Exports:bib2dfdf2bib

Dependencies:askpassclicurldplyrfansigenericsgluehttrhumaniformatjsonlitelifecyclemagrittrmimeopensslpillarpkgconfigR6Rcpprlangstringistringrsystibbletidyselectutf8vctrswithr

bib2df - Parse a BibTeX file to a data.frame

Rendered frombib2df.Rmdusingknitr::rmarkdownon Mar 14 2025.

Last update: 2019-05-22
Started: 2017-06-05

Citation

To cite package ‘bib2df’ in publications use:

Ottolinger P (2025). bib2df: Parse a BibTeX File to a Data Frame. R package version 1.1.2.0, , https://github.com/ropensci/bib2df.

Corresponding BibTeX entry:

  @Manual{,
    title = {bib2df: Parse a BibTeX File to a Data Frame},
    author = {Philipp Ottolinger},
    year = {2025},
    note = {R package version 1.1.2.0, },
    url = {https://github.com/ropensci/bib2df},
  }

Readme and manuals

bib2df - Parse a BibTeX file to a tibblebib2df

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.

library(bib2df)

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

df <- bib2df(path)
df
#> # A tibble: 37 x 27
#>    CATEGORY BIBTEXKEY ADDRESS ANNOTE AUTHOR BOOKTITLE CHAPTER CROSSREF
#>    <chr>    <chr>     <chr>   <chr>  <list> <chr>     <chr>   <chr>   
#>  1 ARTICLE  Arrow1986 <NA>    <NA>   <chr … <NA>      <NA>    <NA>    
#>  2 ARTICLE  AumannBr… <NA>    <NA>   <chr … <NA>      <NA>    <NA>    
#>  3 ARTICLE  Aumann19… <NA>    <NA>   <chr … <NA>      <NA>    <NA>    
#>  4 INCOLLE… Bacharac… Cambri… <NA>   <chr … Knowledg… 17      <NA>    
#>  5 ARTICLE  Basu1988  <NA>    <NA>   <chr … <NA>      <NA>    <NA>    
#>  6 ARTICLE  Bernheim… <NA>    <NA>   <chr … <NA>      <NA>    <NA>    
#>  7 ARTICLE  Bicchier… <NA>    <NA>   <chr … <NA>      <NA>    <NA>    
#>  8 ARTICLE  Binmore2… <NA>    <NA>   <chr … <NA>      <NA>    <NA>    
#>  9 ARTICLE  Brandenb… <NA>    <NA>   <chr … <NA>      <NA>    <NA>    
#> 10 INCOLLE… Brandenb… New Yo… <NA>   <chr … The Econ… 3       <NA>    
#> # … with 27 more rows, and 19 more variables: 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>, DOI <chr>

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("ropensci/bib2df")

Version 1.1.1 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