Convert to an HTML fragment.
An html fragment is suitable for inclusion into an external html page. See
html_document for full details - this is a minor variation that
assumes you will include the output into an existing document (e.g. a blog
html_fragment(number_sections = FALSE, section_divs = TRUE, fig_width = 7, fig_height = 5, fig_retina = 2, fig_caption = TRUE, dev = "png", df_print = "default", smart = TRUE, mathjax = TRUE, includes = NULL, keep_md = FALSE, md_extensions = NULL, pandoc_args = NULL, ...)
TRUEto number section headings
Wrap sections in <div> tags (or <section> tags in HTML5), and attach identifiers to the enclosing <div> (or <section>) rather than the header itself.
Default width (in inches) for figures
Default height (in inches) for figures
Scaling to perform for retina displays (defaults to 2, which currently works for all widely used retina displays). Set to
NULLto prevent retina scaling. Note that this will always be
keep_mdis specified (this is because
fig_retinarelies on outputting HTML directly into the markdown document).
TRUEto render figures with captions
Graphics device to use for figure output (defaults to png)
Method to be used for printing data frames. Valid values include "default", "kable", "tibble", and "paged". The "default" method uses
print.data.frame. The "kable" method uses the
knitr::kablefunction. The "tibble" method uses the tibble package to print a summary of the data frame. The "paged" method creates a paginated HTML table (note that this method is only valid for formats that produce HTML). In addition to the named methods you can also pass an arbitrary function to be used for printing data frames. You can disable the df_print behavior entirely by setting the option
Produce typographically correct output, converting straight quotes to curly quotes, --- to em-dashes, -- to en-dashes, and ... to ellipses.
TRUEto convert $ and $$ math blocks into MathJax compatible output. Note that you'll still need to ensure that the page where the fragment is included loads the required MathJax scripts.
Named list of additional content to include within the document (typically created using the
Keep the markdown file generated by knitting.
Markdown extensions to be added or removed from the default definition or R Markdown. See the
rmarkdown_formatfor additional details.
Additional command line options to pass to pandoc
Additional arguments passed to
See the online
documentation for additional details on using the
R Markdown output format to pass to