| reprex_document {reprex} | R Documentation |
reprex output format
Description
This is an R Markdown output format designed specifically for making
"reprexes", typically created via the reprex() function, which ultimately
renders the document with reprex_render(). It is a heavily modified version
of rmarkdown::md_document(). The arguments have different spheres of
influence:
-
venuepotentially affects input preparation andreprex_render(). Add content to the primary input, prior to rendering:
-
advertise -
session_info -
std_out_err(also consulted byreprex_render())
-
Influence knitr package or chunk options:
-
style -
comment -
tidyverse_quiet
-
RStudio users can create new R Markdown documents with the
reprex_document() format using built-in templates. Do
File > New File > R Markdown ... > From Template and choose one of:
reprex (minimal)
reprex (lots of features)
Both include knit: reprex::reprex_render in the YAML, which causes the
RStudio "Knit" button to use reprex_render(). If you render these documents
yourself, you should do same.
Usage
reprex_document(
venue = c("gh", "r", "rtf", "html", "slack", "so", "ds"),
advertise = NULL,
session_info = opt(FALSE),
style = opt(FALSE),
comment = opt("#>"),
tidyverse_quiet = opt(TRUE),
std_out_err = opt(FALSE),
pandoc_args = NULL
)
Arguments
venue |
Character. Must be one of the following (case insensitive):
|
advertise |
Logical. Whether to include a footer that describes when and
how the reprex was created. If unspecified, the option |
session_info |
Logical. Whether to include
|
style |
Logical. Whether to set the knitr chunk option |
comment |
Character. Prefix with which to comment out output, defaults
to |
tidyverse_quiet |
Logical. Sets the options |
std_out_err |
Logical. Whether to append a section for output sent to
stdout and stderr by the reprex rendering process. This can be necessary to
reveal output if the reprex spawns child processes or |
pandoc_args |
Additional command line options to pass to pandoc |
Value
An R Markdown output format to pass to rmarkdown::render().
Examples
reprex_document()