1. Learn
  2. /
  3. Courses
  4. /
  5. Building Dashboards with shinydashboard

Connected

Exercise

Inserting multiple inputs

You can insert more than just one input. Suppose you also want app users to choose the average number of hours spent sleeping, as well as a specific year.

To this end, in the ui, you can insert another sliderInput() where the values are the years of interest.

In this exercise, the shiny library has already been loaded for you.

Instructions

100 XP
  • Add another sliderInput() as a second input for your shinyApp and label it as "yearlabel".
  • Set the number range to be between 2003 and 2017.