View source: R/make_inline_fig.R
make.inline.fig | R Documentation |
Prints proper markdown to create an inline figure from a file with or without a caption below it. Requires setting ‘results=’asis'' in chunk header.
make.inline.fig(filename, caption = NULL)
filename |
path to file of figure |
caption |
the caption to print below figure using the blockquote markdown syntax. Also creates a link to the original figure. default NULL |
figure.caption
, opts_chunk
```{r example, results='asis'} plot.file <- "example_plot.png" caption <- "An example plot." ggplot::qplot(x = 1:10, y = 1:10) %>% ggsave(filename = plot.file) make.inline.fig(plot.file, caption) ```
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.