slickR in Bookdown: Rendering Canonical Interactive User Manuals
Metrum Research Group
slickR is a R package for creating carousels that can hold various object types. Images, iframes and htmlwidgets can be put into a carousel. We show an example of how this can be leveraged to view in a compact way help manuals for any library.
The library we are using as an example is ggplot2. The help files of ggplot2 thankfully contain many examples and when they are all compiled can create a very long output. Using slickR we can capture all the plot outputs of a given function to a carousel thus keeping a canonic output structure.
- The help file in an Iframe
- The carousel with the outputs
If the library you are compiling has other output formats such as xtables you can use texPreview to embed SVG outputs of LaTeX tables inside the gitbook.