In this section, we will look at putting together your first dashboard. We will cover the code structure for a Shiny dashboard, and we will also look at putting together a simple example.
To make a Shiny dashboard, you will need to download the package using the install.packages command. Note that the package is then loaded in the preamble of the UI to our file.
There are two methods of structuring the code file for a Shiny dashboard and it also requires the setup of three components: dashboardHeader, dashboardSidebar, and dashboardBody. Using the first method, these three components can be passed to dashboardPage very simply, as shown here:
dashboardPage( dashboardHeader(), dashboardSidebar(), dashboardBody(), )
Using the second method, header, sidebar, and body can all be set up separately and then passed to dashboardPage, as shown here...