View source: R/set_knitr_options.R
Set consistent knitr options
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | set_knitr_options(
tidy = FALSE,
echo = TRUE,
highlight = TRUE,
comment = "#>",
collapse = TRUE,
cache = TRUE,
fig.align = "center",
fig.width = 4,
fig.height = 4,
linewidth = 59,
fig.retina = 1,
out.width = "100%",
out.height = "100%",
dev = NULL,
dpi = 192,
dev.args = list(png = list(type = "cairo-png")),
...
)
|
tidy |
FALSE |
echo |
TRUE |
highlight |
TRUE |
comment |
#> |
collapse |
TRUE |
cache |
TRUE |
fig.align |
center |
fig.width |
4 |
fig.height |
4 |
linewidth |
Code chunk line width - default 59 |
fig.retina |
Default 1 |
out.width |
Output width default 100% |
out.height |
Output height default 100% |
dev |
If |
dpi |
If changed to png, set to 192 |
dev.args |
If |
... |
Additional arguments passed to opt_chunk |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.