Learn R Programming

journalabbr (version 0.3.1)

write_tib2bib: Export a BibTeX tibble to a .bib file.

Description

The BibTeX tibble is written to a .bib file.

Usage

write_tib2bib(
  tib,
  file = tempfile(fileext = ".bib"),
  append = FALSE,
  isformat = TRUE,
  isdelkeywords = FALSE,
  connect_author = c("nothing", "\\\\&", "&", "and")
)

Arguments

tib

tibble, in the format as returned by read_bib2tib.

file

character, file path to write the .bib file.

append

logical, if TRUE the tibble will be appended to an existing file.

isformat

logical, if TRUE the Fields in tibble will complete braces to make them appear in pairs.

isdelkeywords

logical, if TRUE and there is a picture of column 'isdelkeywords', column 'isdelkeywords' in the tibble will be deleted.

connect_author

character, what symbols are used to connect multiple authors, 'nothing','\\&', '&', 'and', where 'nothing' stand for do nothing(default).

Value

file as a character string, invisibly.

Examples

Run this code
# NOT RUN {
# Read from .bib file:
require(journalabbr)
path = system.file("extdata", "testfile_1.bib", package = "journalabbr", mustWork = TRUE)
bib <- read_bib2tib(path)

# Write to .bib file:
write_tib2bib(bib, file = tempfile(fileext = ".bib"))
# Use `append = TRUE` to add lines to an existing .bib file:
# }

Run the code above in your browser using DataLab