Learn R Programming

knitcitations (version 0.6-2)

write.bibtex: write a bibtex file

Description

write a bibtex file

Usage

write.bibtex(entry = NULL, file = "knitcitations.bib",
  append = exists(file), verbose = TRUE, create_key = TRUE, ...)

Arguments

entry
a 'bibentry' object, list of bibentry objects, or a character vector of package names. 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.
verbose
a logical to toggle verbosity. If 'file=NULL', verbosity is forced off.
create_key
logical indicating whether function should create a bibtex citation key if the object doesn't have one.
...
additional arguments to WriteBib

Value

  • a list of citation information, invisibly

    The 'knitcitations' package automatically extends the use of this function to be able to write bibtex files from a string of DOIs, making it valuable for purposes beyond the citation of packages.

See Also

read.bib citep citet

Examples

Run this code
write.bibtex(c("Yihui2013" = citation("knitr"),
                "Boettiger2013" = citation("knitcitations"),
                "TempleLang2012"=citation("RCurl")))
 bib <- read.bibtex("knitcitations.bib")

Run the code above in your browser using DataLab