This example shows you how to knit an R Markdown document using the two packages knitr and markdown, and include the HTML output in a shiny app. Note we are using R Markdown v1 here, which has a couple of differences with v2. The basic idea is to call knitr::knit2html()
with the argument template = FALSE
to generate a fragment of HTML code.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.