Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

format_bib

Format Bibentries in Roxygen


Description

Operates on a named list of bibentry() entries and formats them nicely for documentation with roxygen2.

  • format_bib() is intended to be called in the @references section and prints the complete entry using toRd().

  • cite_bib() returns the family name of the first author (if available, falling back to the complete author name if not applicable) and the year in format "[LastName] (YYYY)".

Usage

format_bib(..., bibentries = NULL, envir = parent.frame())

cite_bib(..., bibentries = NULL, envir = parent.frame())

Arguments

...

(character())
One or more names of bibentries.

bibentries

(named list())
Named list of bibentries.

envir

(environment)
Environment to lookup bibentries if not provided.

Value

(character(1)).

Examples

bibentries = list(checkmate = citation("checkmate"), R = citation())
format_bib("checkmate")
format_bib("R")
cite_bib("checkmate")
cite_bib("checkmate", "R")

mlr3misc

Helper Functions for 'mlr3'

v0.10.0
LGPL-3
Authors
Michel Lang [cre, aut] (<https://orcid.org/0000-0001-9754-0393>), Patrick Schratz [aut] (<https://orcid.org/0000-0003-0748-6624>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.