title: refresh the main panel screen in shiny using the action button
body: <p>I am building a shiny app and I want to refresh the main panel screen. Here is a sample code. I have a submit button to display the data and I have a re-fresh button to clear the screen. I am not so sure how to code the re-fresh button in R and shiny since I am new to this.  Thanks for looking into</p>
  
  <pre><code>library(DT)
  ui &lt;- fluidPage(
      sidebarLayout(
        sidebarPanel(
          selectInput("amountTable", "Amount Tables", 1:10),
          actionButton("submit1" ,"Submit", icon("refresh"),
                     class = "btn btn-primary"),
  
          actionButton("refresh1" ,"Refresh", icon("refresh"),
                     class = "btn btn-primary")
  
     ),
     mainPanel(
     # UI output
       uiOutput("dt")
     )
    )
  )
  
  server &lt;-  function(input, output, session) {
     observeEvent(input$submit1, {
       lapply(1:input$amountTable, function(amtTable) {
         output[[paste0('T', amtTable)]] &lt;- DT::renderDataTable({
         iris[1:amtTable, ]
         })
       })
     })
  
    output$dt &lt;- renderUI({
      tagList(lapply(1:10, function(i) {
      dataTableOutput(paste0('T', i))
     }))
   })
  
  }
  
  shinyApp(ui, server)
  </code></pre>