I have a Shiny app where the user through the choices in the app builds a requirements table, once they have added all the information they hit a button to run my R code that generates a new table and saves a file. How can I update my mainPanel with the updated datatable or file? I would like it to just refresh on the screen once the file (or table) is created.
Oh, I should add, I am using the observeEvent on the serverside to run the R code.
Hi, can you provide a reproducible example?
based on what you have described, you can insert a tableOutput in the UI, and then you update this output inside the observeEvent usingrenderTable.
So if your tableOutput is called mytableoutput, the code will be something like: observeEvent(input$mybutton,{ mytable = ... # generate the table .... output$mytableoutput = renderTable(mytable) })