Is there any way to generate documentation for a R shiny application?
It becomes very hard to maintain a shiny application without documentation.
It seems that all the eco-system of tests/documentation is created for an R package structure. Maybe we can emulate/extend this behavior for a shiny application?
An example :
A reactive expression is typically an R shiny element taht can contain complex data structure.
filtered_dat <- reactive({
dx[ NAME == input$crr & TOU == input$tou &
PlotYear == input$year. & PlotMonth == input$season]
})
To give more context, I am here in the context of building a complete web application using R shiny. All the business-logic is wrapped in a separated package(s).
For testing Ui I think it is complicated ( one can use Rselenium for example) , but generating doc from roxygen2
comments is just parsing. It should be easy to have such tool.
Add an example of shiny application
There is not an ideal solution but this is basically what I am doing to deal with my shiny applications to create a robust and well "documented" shiny application:
A typical package will have this structure:
R
ui-view1.R
ui-view2.R
server-server1.R
server-server2.R
controls.R
Here an example:
app
ui.R
server.R
global.R
views
view1.R
view2.R
servers
server1.R
server2.R
init
global1.R
gloabl2.R