write.bib: Generate a Bibtex File from Package Citations

Description Usage Arguments Value Author(s) References Examples

View source: R/bibtex.R

Description

Generates a Bibtex file from a list of packages or all the installed packages. It is useful for adding relevant citations in Sweave documents.

Usage

1
write.bib(entry, file = "Rpackages.bib", append = FALSE, verbose = TRUE)

Arguments

entry

a bibentry object or a character vector of package names. If NULL, then the list of all installed packages is used.

file

output Bibtex file

append

TRUE if the content should be appended to the file

verbose

a logical to toggle verbosity

Value

the list of Bibtex objects – invisibly.

Author(s)

Renaud Gaujoux, based on the function Rpackages.bib from Achim Zeileis (see References).

References

Creating bibtex file of all installed packages? Achim Zeileis. R-help mailing list. https://stat.ethz.ch/pipermail/r-help/2009-December/222201.html

Examples

1
2
3
4
5
6
7
8
## Not run: 
write.bib(c('bibtex', 'utils', 'tools'), file='references')
bibs <- read.bib('references.bib')
write.bib(bibs, 'references2.bib')
md5 <- tools::md5sum(c('references.bib', 'references2.bib'))
md5[1] == md5[2]

## End(Not run)

bibtex documentation built on May 2, 2019, 4:44 p.m.

Related to write.bib in bibtex...