0

Hope all are safe there :slight_smile:

In the below simple application (rather my question should hold for all applications as well), is there a way to build workflow, so that we can get to know about the application well. For example

In this app, In terms of UI.R

1) There is 1 actionbutton (So can we list the number of action buttons in the app, along with there ID's)

2) There is 1 dataTableoutput (So can we list the number of dataTableoutput in the app, along with there ID's) So in general, can we list the number of inputs and there type(actionbutton, radiobutton etc)

Interms of Server.R

3) Can we show that dataTableOutput("Test") is dependent on actionButton("plot"). I mean can we extract a list of outputs that is dependent on observerEvents? So basically, just by running the small chunk of code, the user should know that this output(test) is dependent on observeEvent(plot).?

library(shiny)
library(dplyr)
library(shinycssloaders)
library(DT)

ui <- fluidPage(

    actionButton("plot","plot"),
    dataTableOutput("Test")
)



server <- function(input, output, session) {

    observeEvent(input$plot, {
        output$Test <- DT::renderDT(DT::datatable(head(iris),
                                                  rownames = FALSE, options = list(dom = 't', 
                                                                                   ordering=FALSE)))

    })
}
shinyApp(ui = ui, server = server)
imran p
  • 332
  • 2
  • 12
  • just with the app (without seeing the code), the user should know what is dependent on what? – bretauv Apr 10 '20 at 12:27
  • No No. What i meant was, with the application, (not drilling in detail. Because, when is complicated app, with multiple tabs, it may be difficult for the user to understand it). So in just small chunk of code (incase if there are any), the user can understand how many inputs and outputs are there and which output is dependent on other? Hope this makes sense now. Right? – imran p Apr 10 '20 at 12:31
  • I don't think showing the user a small chunk of code will help him a lot (+ I don't know how to do what you think). You could use interactive presentations such as [`rintrojs`](https://carlganz.github.io/rintrojs/) or [`cicerone`](https://cicerone.john-coene.com/). – bretauv Apr 10 '20 at 12:35
  • Ok thanks. But can we at least list the number of inputs and outputs in the UI along with there type and ID. For example, in this case, 1 actionbutton with plot as ID, 1 datatableoutput with Test as ID. IS it possible to list them – imran p Apr 10 '20 at 12:38
  • I don't know, a quick search online gave me [this](https://stackoverflow.com/questions/41031584/collect-all-user-inputs-throughout-the-shiny-app) but I have never used something like that – bretauv Apr 10 '20 at 12:40

0 Answers0