Book Image

Web Application Development with R Using Shiny

By : Chris Beeley
Book Image

Web Application Development with R Using Shiny

By: Chris Beeley

Overview of this book

<p>R is a highly flexible and powerful tool for analyzing and visualizing data. Shiny is the perfect companion to R, making it quick and simple to share analysis and graphics from R that users can interact with and query over the Web. Let Shiny do the hard work and spend your time generating content and styling, not writing code to handle user inputs.</p> <p>Web Application Development with R Using Shiny is an accessible introduction to sharing interactive content from R using Shiny. You will learn by doing, with each chapter including code and examples to use and adapt for your own applications. By the end of this book, you will be able to build useful and engaging web applications with only a few lines of code – no JavaScript required.</p> <p>Web Application Development with R Using Shiny will show you how to begin analyzing, visualizing, and sharing your data using practical examples.</p> <p>This book will teach you how to rapidly prototype and build interactive data summaries using Shiny's built-in widgets and functions. You will learn how to integrate Shiny applications with your existing HTML and CSS, how to greatly extend the power and usability of your applications using JavaScript, and how to quickly deploy them over the Web.</p> <p>The book uses practical examples to show you how to get the best out of R and Shiny, helping you to produce and share cutting-edge analytics with minimal effort.</p>
Table of Contents (6 chapters)

Advanced reactivity


Now that we've warmed up a bit, let's discuss reactivity in a bit more detail. As we've already learned, reactive functions and objects automatically take dependencies on their inputs. We've also seen that it's often a good idea to use reactive objects rather than just output functions because data objects can be created once and then passed around to different output functions. We're now going to discuss, in a bit more detail, the use of reactive objects in Shiny as well as special functions within it to control reactivity. There is more about reactivity and some very helpful diagrams on the Shiny tutorial pages at http://rstudio.github.io/shiny/tutorial/#reactivity-overview.

The default behavior, as we have seen throughout the book, handles quite a lot of different applications. However, sometimes the default behavior will be slow or confusing for users of your application, or will result in code that is hard to write or maintain or even just not useful. Along with using...