.bib-reference file for the installed R version and R-packages, so they can be cited
in a Markdown-document using pandoc or LaTeX.
r_refs(file, append = TRUE, prefix = "R-", type_pref = c("Article", "Book"), tweak = TRUE)
create_bib(x, file, append = TRUE, prefix = "R-", type_pref = c("Article", "Book"), tweak = TRUE).bib-files should be complemented or overwritten.
See details.write_bib).r_refs is a wrapper for create_bib to create a bibliography for R and all attached or
cached packages. By default, if a file exists at the specified location, r_refs reads the file and
appends missing citation information to the end of the file (create_bib always overwrites
existing files). This behavior may result in redundant package references in your .bib-file,
which will be cited when using cite_r. It is recommended to use a .bib-file
dedicated to R-references, setting append = FALSE, and adding the file to the
bibliography parameter in the document's yaml-header.
Beware that chunks loading packags should not be cached. r_refs will make all packages
loaded in cached chunks citable, but it won't know when you remove a package from a cached chunk. This
can result in unused package references in your .bib-file that will be cited when using
cite_r.
If a package provides citation information in a CITATION file, a reference is selected based on the
prefered order of reference types specified in type_pref. By default, articles are cited if
available rather than books. If no reference of the specified types is available, the first reference
is used. Finally, if no CITATION file exists a reference is generated from the DESCRIPTION file by
citation.
cite_r, write_bib, fetch_web_refs, citation, toBibtex