View source: R/html_fragment.R
html_fragment | R Documentation |
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
post).
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",
mathjax = TRUE,
includes = NULL,
keep_md = FALSE,
md_extensions = NULL,
pandoc_args = NULL,
...
)
number_sections |
|
section_divs |
Wrap sections in |
fig_width |
Default width (in inches) for figures |
fig_height |
Default height (in inches) for figures |
fig_retina |
Scaling to perform for retina displays (defaults to 2, which
currently works for all widely used retina displays). Set to |
fig_caption |
|
dev |
Graphics device to use for figure output (defaults to png) |
df_print |
Method to be used for printing data frames. Valid values
include "default", "kable", "tibble", and "paged". The "default" method
uses a corresponding S3 method of |
mathjax |
|
includes |
Named list of additional content to include within the
document (typically created using the |
keep_md |
Keep the markdown file generated by knitting. |
md_extensions |
Markdown extensions to be added or removed from the
default definition of R Markdown. See the |
pandoc_args |
Additional command line options to pass to pandoc |
... |
Additional arguments passed to |
See the online
documentation for additional details on using the html_fragment
format.
R Markdown output format to pass to render
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.