0

I work on a Shiny app with multiple reactive variables as well as output objects scattered in numerous tabItems. The idea behind this app is that on the first page you download a selected dataset, through an action button, that will be used by the entire app. After having created multiple reactive values and output objects when the user will explore the app, I would like to know if there is a simple way to re-initialize the application (reactive variables, output objects) as soon as we download another dataset thanks to the previous action button I have mentionned earlier. In fact, I want to delete the value of reactive variables and output objects from the memory every time I click on this specific button and DL a new dataset. I want this app to be the same as it is when I launch my code for the first time.

Regards Thibaut

I tried to use reactive values a lot but it has to be done for every variables. Perhaps, there is a simpler way.

thibaut.Ch
  • 11
  • 1
  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. It's not clear what your current code is doing so it's hard to make any useful suggestions – MrFlick Nov 01 '22 at 20:12
  • Ok I will do it. My app is just very heavy so I will include a short example. It was more a general question to know if there is a way to re-initialize a shiny app thanks to a function or something else rather than a precised question. – thibaut.Ch Nov 01 '22 at 20:16
  • 1
    You might get somewhere with `session$reload()` – Mikko Marttila Nov 01 '22 at 20:35

0 Answers0