Search code examples
rrstudioslidifydeck.js

How I can include the use of the extension deck.automation.js when I create a document Rmarkdown-slidify-deck.js in RStudio?


How I can include the use of the extension deck.automation.js when I create a document Rmarkdown-slidify-deck.js in RStudio? It is to show a presentation on a screen with statistical content without interaction from anyone, and when finished will start automatically.

https://github.com/rchampourlier/deck.automatic.js

http://ramnathv.github.io/slidify/index.html


Solution

  • Here is a demo of how to add this extension to deckjs, while using Slidify. In short, here is what you need to do.

    1. Use author("mydeck") to initialize deck, change framework to deckjs and run slidify("index.Rmd")
    2. Download the extension automatic and add it to libraries/frameworks/deckjs/extensions.
    3. Modify libraries/frameworks/deckjs/config.yml so that automatic is added to the list of extensions.
    4. Modify libraries/frameworks/deckjs/partials/snippet.html, so that the javascript snippet required to initialize the extension is added.

    You can also add an option for Play/Pause, as well as set custom slide durations. Instructions are in the slide deck here.

    UPDATE: The instructions here assume that you have the dev branches of Slidify and Slidifylibraries installed.

    pkgs <- c("slidify", "slidifyLibraries")
    devtools::install_github(pkgs, "ramnathv", ref = "dev")