powered by
This function is called by the provided Rd macro \cite{pkg}{key}:
\cite{pkg}{key}
Parses the bibtex file references.bib in the root directory of package package using bibtex::read.bib().
references.bib
package
bibtex::read.bib()
Extracts the entry with key key.
key
Converts to Rd with tools::toRd().
tools::toRd()
cite_bib(package, key)
(character(1)) Package to read the bibtex file from.
character(1)
(character(1)) Entry of the bibtex file.
(character(1)) Bibentry formated as Rd.
# NOT RUN { # examplary bibtex file path = system.file("references.bib", package = "mlr3misc") cat(readLines(path), sep = "\n") # return value: raw rd cite_bib("mlr3misc", "mlr") # }
Run the code above in your browser using DataLab