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

md

Interpret input text as Markdown-formatted text


Description

Markdown! It's a wonderful thing. We can use it in certain places (e.g., footnotes, source notes, the table title, etc.) and expect it to render to HTML as Markdown does. There is the html() helper that allows you to ferry in HTML but this function md()... it's almost like a two-for-one deal (you get to use Markdown plus any HTML fragments at the same time).

Usage

md(text)

Arguments

text

The text that is understood to contain Markdown formatting.

Value

A character object of class from_markdown. It's tagged as being Markdown text and it will undergo conversion to HTML.

Figures

Function ID

7-1

See Also

Examples

# Use `exibble` to create a gt table;
# when adding a title, use the `md()`
# helper to use Markdown formatting
tab_1 <-
  exibble %>%
  dplyr::select(currency, char) %>%
  gt() %>%
  tab_header(
    title = md("Using *Markdown*"))

gt

Easily Create Presentation-Ready Display Tables

v0.2.2
MIT + file LICENSE
Authors
Richard Iannone [aut, cre] (<https://orcid.org/0000-0003-3925-190X>), Joe Cheng [aut], Barret Schloerke [aut] (<https://orcid.org/0000-0001-9986-114X>), RStudio [cph, fnd]
Initial release

We don't support your browser anymore

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