Search code examples
rshinyslidify

Trying to insert R Shiny Apps in Slidify


I am having difficulty finding good examples of how to embed R Shiny Apps in a Slidify presentation. Ideally I would like to reference the external app.R file instead of recreating my existing code in the index.Rmd. Can anyone provide examples, include which widgets I need to include, and if I can also have data (as an excel file) accompany the embedded app (using a relative path?).

Is Slidify development still ongoing? Most posts I find are from 2 or more years ago.

Thanks

Tim


Solution

  • I looked into this in some detail because I was dealing with a similar issue.

    The short version is, slidify is not longer really compatible with shiny, but the bulk of its functionality has been rolled-into rmarkdown, which is compatible with shiny.

    Ramnath's last comments about this with slidify, were that it would require very substantial changes to the code to make it work. That was 2015. shiny has changed substantially since then. So they're pretty out of sync.

    The bright side is that rmarkdown now incorporates the bulk of the slidify functionality. It supports the ioslides and slidy slide frameworks. (ioslides is very similar to slidify's io2012). The functionality that hasn't been included, is support for multiple slide layouts using moustache. But that isn't too big a deal, because you can just write the html directly into your rmarkdown slides. Its also a lot easier to customize than it was with slidify. shiny, htmlwidgets, etc., all work transparently. If the visualization packages support it, its also very easy to switch between display in shiny, and packaging the presentation as a single html5 document for distribution.