Learn R Programming

ThomasJeffersonUniv (version 0.1.3)

bibentry2rmd: R Markdown Format of citation and/or bibentry

Description

R markdown format of a citation and/or bibentry object.

Usage

bibentry2rmd(x = "R")

Value

Function bibentry2rmd returns a character scalar or vector.

Arguments

x

character scalar, 'R' (default) or name of an R package

Details

Function bibentry2rmd beautifies the output from function utils:::format.bibentry (with option style = 'text') in the following ways.

  • Line break '\n' is replaced by a white space;

  • Fancy quotes \(``\), \(''\), \(`\) and \('\) are removed;

  • doi entries are shown as URLs with labels (in R markdown grammar).

Examples

Run this code
bibentry2rmd('survival')
if (FALSE) { # disabled for ?devtools::check
ap = rownames(installed.packages())
lapply(ap, FUN = bibentry2rmd)
}

Run the code above in your browser using DataLab