Session Ready
Exercise

Adding structure to your app

Layouts in Shiny are used to give your app some structure by placing elements in certain desired positions.

A sidebar layout, created with the sidebarLayout() function, provides a basic two-column structure with a smaller sidebar on the left and a larger main panel on the right.

The sidebar layout function takes two arguments: sidebarPanel() and mainPanel(). Each of these panels can contain any arbitrary mix of text/HTML elements, in a similar fashion to how you can mix these elements inside a fluidPage().

Instructions
100 XP

Your task is to add a sidebar layout to the existing app, such that the inputs will be on the left side and the outputs will be in the main panel. Specifically, you need to:

  • Define the UI for the Shiny application.
  • Add a sidebar layout to the page.
  • Add a sidebar panel to the layout, and place the inputs and text in it.
  • Add a main panel to the layout, and place the plot and table in it.