Each R Shiny application consists of two primary sections, which are the UI section and the server section. The UI, as the name suggests, is used to define the user interface, whereas the server section is used for executing the underlying R server side code. The shinyApp function is used in order to launch the application using the ui and server definitions.
The UI object holds the R Shiny widgets used to prepare the frontend components that the user will interact with while using the application.
A few toy examples have already been included as part of the RStudio programming environment. In order to launch an R Shiny application, run the following code in RStudio:
library(shiny)
runExample("01_hello")
This will launch a basic R Shiny app, shown as follows:
You can view the other applications available as examples by simply executing the following...