Exercise

Dropdown menus

You have seen how drop-down menus can be added to a shinyApp. This allows the app user to pick an option out of a list of options, while occupying a small amount of space. This can make for a good UI design if there are already many other features added to the app.

In this exercise, the data has been stored as sleep and a plot called p has already been stored. The shiny and tidyverse libraries have also been loaded for you. When you have completed the code, you can open the shinyApp in a HTML Viewer for a more complete view.

Instructions

100 XP
  • Place a selectInput() with two choices called "Plot" and "Table".
  • Place a plotOutput() and tableOutput called "plot" and "table".
  • Add the plot output to the server.
  • Add the table output to the server.