View source: R/markdown_tools.R
insert_figure | R Documentation |
Builds a character with the R code chunks for the given figure objects.
insert_figure(
...,
file = NULL,
ref_names = NULL,
captions = NULL,
legend = TRUE,
legend_text = "<<legend>>",
html = FALSE,
style_ref = "legend",
append = FALSE
)
... |
figure objects. |
file |
a file to which the chunks are written. If the file exists already, it will be appended or overwritten. If NULL, the text is printed in the console. |
ref_names |
names of the figure chunk in the R markdown output. If NULL, default names ('figure1', 'figure2' and so on) are used. |
captions |
figure captions. If NULL, default captions ('caption for figure 1' and so on) are used. |
legend |
logical, should a text with the figure reference in bold be included below the figure chunk? |
legend_text |
a character vector or list with detailed legend texts. |
html |
logical: should the legend be HTML styled? |
style_ref |
name of the CSS style of the legend text, valid only for the HTML output. |
append |
logical, should the output file be appended? |
invisibly retuns a ready-to-use figure chunk text.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.