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

Exercise

Your first shinyApp

You have seen how inputs and outputs can be put together in a shinyApp. You have also seen how a shinyApp can be constructed to communicate results from the sleep study.

Your goal now is to create a shinyApp to report two main results:

  1. The distribution of sleep hours
  2. The median sleep hours amongst different age groups

In this exercise, we have stored the data in the form of a dplyr data frame called sleep, and the shiny and tidyverse libraries have already been loaded.

Now it's your turn to create your own shinyApp!

Instructions

100 XP
  • Add two plot outputs called "histogram" and "barchart" to the mainPanel.
  • In the choiceNames argument in checkboxGroupInput(), replace its contents with icons called "calendar", "briefcase" and "gift".
  • Define the two outputs, one called histogram, and another called barchart.
  • Use the shinyApp() function to render the shiny app.