11.7 UI: Control widgets/inputs (1)

  • More lengthy explanation in the shiny tutorial
  • Widget = Web element the user can interact with (Shiny widget gallery)
    • Users can send messages to the SERVER/Computer (e.g. “I want to choose this variable”)
  • Widgets can be added everywhere
    • Example for a widget below… selectinput() widget
  • Widget functions requires arguments
    • selectInput("select", label = h3("Select box"), choices = list("Choice 1" = 1, "Choice 2" = 2), selected = 1)
  • Underlying logic is the same for all widgets
    • User uses widget to give input
    • Input is inserted into the functions in the SERVER: server <- function(input, output) {}