eyio
eyio

Reputation: 357

How to avoid recalculation in shiny R each time a tab is clicked on?

In my shiny application, I have noticed that when I have multiple tabs, each time I click on the tab, the output is recalculated. I wasn't expecting this behavior since no inputs were changed. How can I keep it so that it only recalculates once an actual input is changed?

Upvotes: 2

Views: 163

Answers (1)

Marcin
Marcin

Reputation: 8044

You can prepare your calculataions prior and save them to name.rda file with save function, and then add a line load("name.rda") at the beggining of the server.r file - the data will be loaded only at the beggining of your application. Can't help much without your code.

Upvotes: 1

Related Questions