abbr2bib: Journal field abbreviation of BibTeX file

Description Usage Arguments Value Examples

View source: R/abbr2bib.R

Description

Input Bib file with complete journal, output Bib file after abbreviation of journal, and return to the abbreviation table of journal

Usage

1
abbr2bib(file, outfile = tempfile(fileext = ".bib"))

Arguments

file

character, input a .bib file.

outfile

character, file path to write the .bib file. An empty character string writes to stdout (default).

Value

output a new Bib file in the current directory, which only abbreviates the journal fields, and the rest remains unchanged. And return to a tibble, it has four columns:

JOURNAL

Original journal field in bib

journal_abbr

Field after abbreviation of original journal

originFile

Abbreviate the source of the database file, see https://github.com/JabRef/abbrv.jabref.org/tree/master/journals

is_abbr

There are only three cases, 1 represents that the item has a JOURNAL field and has been abbreviated successfully, - 1 means that the item does not have a JOURNAL field, and 0 represents that the item has a JOURNAL field, but the corresponding abbreviation is not found in the database, so the original JOURNAL field is used instead

Examples

1
2
3
require(journalabbr)
path = system.file("extdata", "testfile_1.bib", package = "journalabbr", mustWork = TRUE)
temptab = abbr2bib(file = path, outfile =  tempfile(fileext = ".bib"))

journalabbr documentation built on Aug. 7, 2020, 1:06 a.m.