O'Reilly logo

Learning Shiny by Hernán G. Resnizky

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

global.R coding

While the previous section covered processes that had to be done only once whenever the data source changes, global.R will include all the actions that can be done just once per session, for example, see the following:

  • Data source loading
  • Library calls
  • Custom functions sourcing

In our case, apart from loading the dataset and calling the corresponding libraries, we will need to generate a vector that contains the names of all the categorical variables. This will be used in one of the variables selectors. Of course, this last step can be avoided and the list of variables can be hardcoded.

However, in terms of the application's maintenance, it is much wiser to do it this way because if the data source changes (for example, a new categorical ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required