Advanced reactivity and data handling

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 shinyServer().

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, ...

Get Web Application Development with R Using Shiny - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.