Code Patterns in Shiny Applications

As your Shiny applications become larger and more complex, it is important to write clear, readable, and maintainable code. In some cases, it is also necessary to modularize your code. This chapter covers various aspects of writing and debugging Shiny applications, functions, and modules. We will also look at features that relate to the control of reactivity within your application and how to speed up Shiny applications.

In this chapter, we will cover the following topics:

  • Reactivity in RShiny
  • Controlling specific input with the isolate() function
  • Running reactive functions over time
  • Event handling using observeEvent
  • Functions and Modules
  • Shinytest
  • Debugging
  • Handling errors (including validate() and

Get Web Application Development with R Using Shiny - Third 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.