Best practices for Shiny apps in vignettes?

Disclaimer: I am not that experienced with Shiny or with writing vignettes. I am currently working on a vignette for a ggplot2 extension package that demonstrates how the package can be used within a Shiny app. The vignette includes small snippets of code from the app, followed by descriptions of what each part does. However I also wanted to include the full app source code somehow. However it is >100 lines long and the vignette becomes awkwardly long if it's all included. I was wondering what the best or most accepted practice is, out of the following possibilities:

  • Embed the app in the vignette, so that users can see it in action. They can go back to the .Rmd file to get the source code of the app.
  • Include the source code in the vignette but do not embed the app, so that the document can be viewed in static form.
  • Include the source code in a separate .R file, with or without the app embedded in the vignette.

If anyone has any insights, that would be very helpful.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.