Please use
cff_write_bib() or
cff_write_citation() instead.
Usage
write_bib(x, file = tempfile(), append = FALSE, verbose = TRUE, ascii = FALSE)
write_citation(
x,
file = "./inst/CITATION",
append = FALSE,
verbose = TRUE,
...
)See also
cff_write_bib()for writing*.bibfiles.cff_write_citation()for writing RCITATIONfiles.
Other deprecated functions:
cff_extract_to_bibtex(),
cff_from_bibtex(),
cff_parse_citation(),
cff_parse_person()
Examples
bib <- bibentry("Misc",
title = "My title",
author = "Fran Pérez"
)
my_temp_bib <- tempfile(fileext = ".bib")
cff_write_bib(bib, file = my_temp_bib)
#> ℹ Writing 4 entries ...
#> ✔ Results written to /tmp/RtmpmljiJN/file5c95511c8a3.bib
cat(readLines(my_temp_bib), sep = "\n")
#> @Misc{,
#> title = {My title},
#> author = {Fran Pérez},
#> }
cff_write_bib(bib, file = my_temp_bib, ascii = TRUE, append = TRUE)
#> ℹ Creating a backup of /tmp/RtmpmljiJN/file5c95511c8a3.bib in /tmp/RtmpmljiJN/file5c95511c8a3.bib.bk1
#> ℹ Writing 4 entries ...
#> ✔ Results written to /tmp/RtmpmljiJN/file5c95511c8a3.bib
cat(readLines(my_temp_bib), sep = "\n")
#> @Misc{,
#> title = {My title},
#> author = {Fran Pérez},
#> }
#> @Misc{,
#> title = {My title},
#> author = {Fran P{\'e}rez},
#> }
