Running WB-DEGS

Every Shiny app has the same structure: two R scripts saved together in a directory. At a minimum, a Shiny app has ui.R and server.R files.


You can run a Shiny app by giving the name of its directory to the function runApp. For example, here our Shiny app is in a directory called "WB_Degs", we can run it with the following code:

library(shiny)
runApp("WB_Degs")

Alternatively, open the ui.R or server.R scripts, which is located under the WB_Degs directory, in your RStudio editor. RStudio will recognize the Shiny script and provide a Run App button (at the top of the editor). Either click this button to launch your app or use the keyboard shortcut: Command+Shift+Enter (Control+Shift+Enter on Windows).


RStudio will launch the app in a new window by default, but you can also choose to have the app launch in a dedicated viewer pane, or in your external web browser. Make your selection by clicking the icon next to Run App.


The script creates a user-interface that has a title panel and then a sidebar layout, which includes a sidebar panel containing all parameters and a main panel where all results are displayed.