2.14 An easy bibliography for R packages

If you only want to reference R packages in your document then the knitr package has a function to create a bibliography of the loaded R packages.

To create the packages.bib file from all the loaded packages:

knitr::write_bib(.packages(), "packages.bib")