bib2df {bib2df}R Documentation

Parse a BibTeX file to a tibble

Description

The BibTeX file is read, parsed, tidied and written to a tibble

Usage

bib2df(file, separate_names = FALSE, merge_lines = FALSE)

Arguments

file

character, path or URL to a .bib file.

separate_names

logical, should authors' and editors' names be separated into first and given name?

merge_lines

logical, set to FALSE by default. If set to TRUE identifies entries that span several lines and merges them

Details

For simplicity bib2df() unifies the reading, parsing and tidying of a BibTeX file while being aware of a standardized output format, different BibTeX styles and missing values in the BibTeX file.

When separate_names = TRUE, the respective columns contain a data.frame for each row. When FALSE, the respective columns contain character strings.

Value

A tibble.

Author(s)

Philipp Ottolinger

See Also

df2bib

Examples

# Read from .bib file:
path <- system.file("extdata", "bib2df_testfile_3.bib", package = "bib2df")
bib <- bib2df(path)
str(bib)

# Read from .bib file and separate authors' and editors' names:
bib <- bib2df(path, separate_names = TRUE)
str(bib)

[Package bib2df version 1.1.2.0 Index]