write.bibtex: write a bibtex file

Description Usage Arguments Value See Also Examples

View source: R/write.bibtex.R

Description

write a bibtex file

Usage

1
write.bibtex(entry = NULL, file = "knitcitations.bib", append = FALSE, ...)

Arguments

entry

a 'bibentry' object or list of bibentry objects. If NULL, writes all that have currently been cited.

file

output bibtex file. Will automatically append '.bib' if not added. if 'NULL' will use stdout.

append

a logical indicating that bibtex entries be added the the file. If FALSE (default), the file is overwritten.

...

additional arguments to WriteBib

Value

a list of citation information, invisibly

See Also

read.bib citep citet

Examples

1
2
3
4
5
6
 tmp <- tempfile(fileext=".bib")
 write.bibtex(c(citation("knitr"),
                citation("knitcitations"),
                citation("httr")),
               file = tmp)
 bib <- read.bibtex(tmp)

Example output

Writing 5 Bibtex entries ... OK
Results written to file '/work/tmp/tmp/RtmpN7OvWT/file107c2ab63b0b.bib'

knitcitations documentation built on Jan. 13, 2021, 9:57 a.m.