2
votes

I created a Shiny app which is doing a long computation and therefore i am running it on a local server in my Network.

I can access the app via my computer, upload files and start the calculation. But when I close the browser and access the app via a weblink again, Shiny will start a new empty session.

How can I reconnect to the "closed" session with the hopefully still running computation and uploaded files?

It seems that it may be possible with RStudio Connect or running the app via a ShinyServer. Is there another easy way to handle it?

1

1 Answers

0
votes

Reconnecting to the exact same session seems not possible. I found after a lot of research the Bookmark function, which saves your Input inside a new URL or on a Server. See references here: Link

Unfortunately, it didnt work really good because i had bigger plots and tables as saved output.

I solved the problem with a workaround. In the end of the computation i save the whole environment with save.image(file='myEnvironment.RData')

I added an actionbutton and by clicking it loads the saved environment with load('myEnvironment.RData'). After this, all files are back in the environment and new outputs can be created by e.g. output$xy <- renderPlot({XY}).

Hope that helps