In-text full references/citations in RMarkdown using Bibtex
-package.
Solution using bibtex-package proposed by Samuel-Rosa.
An example with citations for packages:
- Example
.bib
file
knitr::write_bib("R"), "example.bib")
- Read your
.bib
file into R.
refs <- bibtex::read.bib("example.bib")
- Using in-line chunks, select the entry of interest, e.g.
R-base
, print the entry, and "capture" it as character for RMarkdown output.
Example full reference for R:
> `r capture.output(print(refs["R-base"]))`
Output:
Example full reference for R:
R Core Team (2021). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. <URL: https://www.R-project.org/>.