Learn R Programming

cffr (version 1.4.2)

write_bib: Previous API: write files

Description

[Deprecated] Use cff_write_bib() or cff_write_citation().

Usage

write_bib(x, file = tempfile(), append = FALSE, verbose = TRUE, ascii = FALSE)

write_citation( x, file = "./inst/CITATION", append = FALSE, verbose = TRUE, ... )

Value

Writes a file.

Arguments

x

A bibentry or a cff object.

file

Name of the file to be created. If NULL, the lines are displayed instead.

append

A logical value. If TRUE, append entries to an existing file.

verbose

A logical value. If TRUE, display informative messages.

ascii

A logical value. If TRUE, write entries using ASCII characters only.

See Also

  • cff_write_bib() for writing *.bib files.

  • cff_write_citation() for writing R CITATION files.

Deprecated functions: cff_extract_to_bibtex(), cff_from_bibtex(), cff_parse_citation(), cff_parse_person()

Examples

Run this code
bib <- bibentry("Misc",
  title = "My title",
  author = "Fran Pérez"
)

my_temp_bib <- tempfile(fileext = ".bib")

cff_write_bib(bib, file = my_temp_bib)

cat(readLines(my_temp_bib), sep = "\n")

cff_write_bib(bib, file = my_temp_bib, ascii = TRUE, append = TRUE)

cat(readLines(my_temp_bib), sep = "\n")

Run the code above in your browser using DataLab