Now that we've warmed up a bit, let's discuss loading data and reactivity in a bit more detail. The first thing to note is the different ways to load data in R and the effects each has. Data can be loaded before the
shinyServer() function, within the
shinyServer() function, or within a reactive function, which is itself defined within
Each has a different effect. Data loaded outside the
shinyServer() function will be loaded once only, whenever the Shiny server instance is launched (for more on running your own Shiny server see Chapter 7, Sharing Your Creations). When you're running programs locally, the server instance is launched every time the program is launched, so for local applications, ...