| WriteBib {RefManageR} | R Documentation |
Create a BibTeX File from a BibEntry Object e Creates a Bibtex File from a BibEntry object for use with either BibTeX or BibLaTex.
WriteBib(bib, file = "references.bib", biblatex = TRUE, append = FALSE, verbose = TRUE, ...)
bib |
a BibEntry object to be written to file |
file |
character string naming a file, should; end in “.bib”.
Can be |
biblatex |
boolean; if |
append |
as in |
verbose |
as in |
... |
additional arguments passed to |
bib - invisibly
To write the contents of bib “as is”, the argument
biblatex should be TRUE, otherwise
conversion is done as in toBibtex.BibEntry.
McLean, M. W. based on write.bib by Gaujoux, R.
in package bibtex.
write.bib, ReadBib,
toBibtex.BibEntry, toBiblatex,
BibEntry
bib <- ReadCrossRef(query = '10.1080/01621459.2012.699793')
## Write bib if no server error
if (length(bib)){
tfile <- tempfile(fileext = ".bib")
WriteBib(bib, tfile, biblatex = TRUE)
identical(ReadBib(tfile), bib)
unlink(tfile)
}