Learn R Programming

bib2df (version 1.1.1)

bib2df: 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)

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?

Value

A tibble.

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.

See Also

df2bib

Examples

Run this code
# NOT RUN {
# 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)
# }

Run the code above in your browser using DataLab