Generate a Bibtex File from Package Citations
Generates a Bibtex file from a list of packages or all the installed packages. It is useful for adding relevant citations in Sweave documents.
write.pkgbib( entry = NULL, file = "Rpackages.bib", prefix = "", append = FALSE, verbose = TRUE )
entry |
a |
file |
output Bibtex file. It can be specified as a filename (as a single
character string), NULL for |
prefix |
character string to prepend to the generated packages' Bibtex key. |
append |
a logical that indicates that the Bibtex entries should be added
to the file. If |
verbose |
a logical to toggle verbosity. If |
Multiple citations are handled by adding a numeric suffix to the Bibtex key
(other than the first/main citation) as "<pkgname>%i"
(e.g. pkg, pkg2, pkg3).
the list of Bibtex objects – invisibly.
The Old version of this function write.bib has now been integrated by Romain Francois in the bibtex package.
Renaud Gaujoux, based on the function Rpackages.bib
from Achim Zeileis (see References).
Creating bibtex file of all installed packages? Achim Zeileis. R-help mailing list. https://stat.ethz.ch/pipermail/r-help/2009-December/415181.html
link{connection}
, link{bibentry}
write.pkgbib(c('rbibutils', 'utils', 'tools'), file='references') bibs <- rbibutils::readBib('references.bib', "UTF-8") write.pkgbib(bibs, 'references2.bib') bibs2 <- rbibutils::readBib('references.bib', "UTF-8") identical(bibs, bibs2) # write to stdout() write.pkgbib(c('rbibutils', 'utils', 'tools'), file=NULL) # clean up unlink(c('references.bib', 'references2.bib'))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.