md_verb | R Documentation |
Converts the provided R expressions to their character representation using base::deparse1()
and formats them as verbatim Markdown.
md_verb(
...,
.eval = TRUE,
.collapse = " ",
.backtick = TRUE,
.control = c("keepNA", "keepInteger", "niceNames", "showAttributes", "warnIncomplete"),
.width.cutoff = 500L,
.nlines = -1L
)
... |
R expression(s) to convert to verbatim Markdown. Must be unnamed. Dynamic dots are supported. |
.eval |
Whether or not to evaluate the expression(s) in |
.collapse |
String to separate the results of a single expression in |
.backtick |
Whether or not to enclose symbolic names in backticks if they do not follow the standard syntax. |
.control |
Deparsing options. A character vector or |
.width.cutoff |
Cutoff (in bytes) at which line-breaking is tried. An integer scalar between |
.nlines |
Maximum number of lines to produce. A negative value indicates no limit. An integer scalar. |
A character vector of the same length as ...
.
Other (Pandoc) Markdown functions:
as_md_list()
,
as_md_val_list()
,
as_md_vals()
,
pipe_table()
,
strip_md()
,
strip_md_footnotes()
pal::md_verb(1:3, "It", is.logical, `||`, FALSE, quote(`?!`)) |>
pal::cat_lines()
# you can splice vector or list expressions if you like
pal::md_verb(!!!1:3, "It", is.logical, `||`, FALSE, quote(`?!`)) |>
pal::cat_lines()
# to evaluate, or not to evaluate, that is the question
pal::md_verb(!!!1:3, "It", is.logical, `||`, FALSE, quote(`?!`),
.eval = FALSE) |>
pal::cat_lines()
# unevaluated expressions do not need to exist
pal::md_verb(Not, actual(), `R-expressions`,
.eval = FALSE) |>
pal::cat_lines()
# you can opt out of wrapping non-standard syntax in additional backticks
pal::md_verb(Not, actual(), `R-expressions`,
.eval = FALSE,
.backtick = FALSE) |>
pal::cat_lines()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.