Create a bib file for R packages, including the citations of user-defined packages.

bib(pkg = c("base"), bibfile = "")

Arguments

pkg

character. Packages

bibfile

character. File path and name to save the bib entries. If "" (the default), it prints to the standard output connection, the console unless redirected by sink.

Value

bib entries

Examples

bib()
#> @Manual{R-base, #> title = {R: A Language and Environment for Statistical Computing}, #> author = {{R Core Team}}, #> organization = {R Foundation for Statistical Computing}, #> address = {Vienna, Austria}, #> year = {2018}, #> url = {https://www.R-project.org/}, #> }
bib(pkg = c("mindr", "bookdownplus", "pinyin"))
#> @Manual{R-bookdownplus, #> title = {bookdownplus: Generate Assorted Books and Documents with R 'bookdown' Package}, #> author = {Peng Zhao}, #> year = {2019}, #> note = {R package version 1.5.5}, #> url = {https://github.com/pzhaonet/bookdownplus}, #> } #> @Manual{R-mindr, #> title = {mindr: Convert Files Between Markdown or Rmarkdown Files and Mindmaps}, #> author = {Peng Zhao}, #> year = {2019}, #> note = {R package version 1.1.12}, #> url = {https://github.com/pzhaonet/mindr}, #> } #> @Manual{R-pinyin, #> title = {pinyin: Convert Chinese Characters into Pinyin, Sijiao, Wubi or Other #> Codes}, #> author = {Peng Zhao}, #> year = {2018}, #> note = {R package version 1.1.5}, #> url = {https://github.com/pzhaonet/pinyin}, #> }