Before diving deep into the different possibilities that Shiny provides, it is necessary to have a clear understanding of what Shiny is. For this reason, this chapter covers its central concepts with a special focus on reactivity and explains the structure of their implementation.
In short, we will cover the following topics:
server.R
and UI.R
global.R
In Chapter 1, Introducing R, RStudio, and Shiny, we learned that Shiny is a package. Packages in R, in most cases, are a collection of functions (in some cases, also datasets) that serve certain objectives. For example, the glm
package provides the necessary functions to run general linear models. Packages can also use functions from other packages. In this case, it is said that these packages depend on the package/s that contain the functions that are being used.
Shiny is then a package that contains a set of functions to build web applications within R. However, Shiny is a special package in the following two ways: