Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refreshing shiny dataset

I have update my DataSet.RData used by my shiny app running on Shiny Server. However, shiny app is still running on the old data. I have cleared by browser history and restarted the browser a couple of times but no success.

When I run app within RStudio, it runs fine and shows the new data.

like image 902
M.Qasim Avatar asked Apr 11 '26 04:04

M.Qasim


1 Answers

If you create/edit a file called restart.txt in your app folder the server restarts the application. To do so, you can add a button to create/edit that file like,

# ui.R
actionButton("restart", "Restart")

# server.R
observeEvent(input$restart, {
    file.create("restart.txt")
})

After clicking this button and refresh the page your data should also be refreshed.

like image 79
Dogan Askan Avatar answered Apr 12 '26 16:04

Dogan Askan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!