Session Ready
Exercise

Adding placeholders for outputs

Outputs are any object that should be displayed to the user and is generated in R, such as a plot or a table.

To add an output to a Shiny app, the first thing you need to do is add a placeholder for the output that tells Shiny where to place the output.

There are several output placeholder functions provided by Shiny, one for each type of output. For example, plotOutput() is for displaying plots, tableOutput() is for outputting tables, and textOutput() is for dynamic text.

Instructions
100 XP
  • Create a text input with an ID of "name" in the sidebar panel.
  • Add three output placeholders to the main panel:
    • A text output with ID "greeting" (line 14).
    • A plot output with ID "cars_plot" (line 16).
    • A table output with ID "iris_table" (line 18).