R Markdown documents are a perfect platform for interactive content. To make your documents interactive, add:
Learn more about packages that build htmlwidgets at www.htmlwidgets.org.
The Shiny package builds interactive web apps powered by R. To call Shiny code from an R Markdown document, add
runtime: shiny to the header, like in this document, which is also available on RStudio Cloud.
Use Shiny to run any R code that you like in response to user actions. Since web browsers cannot execute R code, Shiny interactions occur on the server side.
Learn more about Shiny at the Shiny Development Center.
If you include an interactive element in a static output format, like a PDF, R Markdown will embed a screenshot of the element.
Learn more about interactive documents with R Markdown at Interactive Documents.