| readBib {rbibutils} | R Documentation |
Read and write bibtex files.
readBib(file, encoding) writeBib(object, con = stdout(), append = FALSE)
file |
name or path to the file, a character string. |
encoding |
the encoding of |
object |
a |
con |
filename (a character string) or a text connection |
append |
if |
readBib is wrapper around bibConvert for import of
bibtex files into bibentry objects.
writeBib writes a bibentry object to a bibtex file.
for readBib, a bibentry object
for writeBib, the bibentry object (invisibly)
Georgi N. Boshnakov
readBibentry and writeBibentry for
import/export to R code.
## create a bibentry object
bibs <- readBib(system.file("REFERENCES.bib", package = "rbibutils"),
encoding = "UTF-8")
## write bibs to a file
fn <- tempfile(fileext = ".bib")
writeBib(bibs, fn)
## see the contents of the file
readLines(fn) # or: file.show(fn)
unlink(fn)