Documenting modules and other constructs within a shiny app

This is something I've been thinking about recently, too. The way I see it I have two options:

  1. Write a separate document (something like a vignette) that contains documentation for each reactive or
  2. Create wrapper functions for each reactive (some of mine have that already) and then document those in the "normal" manner using an R package/roxygen2 comments. You could even wrap the app up in the package, similar to how @daattali describes creating an example app for a package here.

The first option is perhaps a good short-term solution for a simple app that you just need to describe to others at a high level. I lean towards the second option for more complex apps, or one where you have collaborators (even future-you!) who will need to understand more of the detail.

2 Likes