Recall & Review
beginner
What is Shiny in R?
Shiny is a package in R that helps you build interactive web apps easily without needing to know web programming languages.
Click to reveal answer
beginner
What are the two main parts of a Shiny app?
A Shiny app has two main parts: UI (user interface) which controls what the user sees, and server which controls how the app works behind the scenes.
Click to reveal answer
beginner
What function is used to create the user interface in Shiny?
The function
fluidPage() is commonly used to create a simple and responsive user interface in Shiny apps.Click to reveal answer
intermediate
How do you make a Shiny app respond to user input?
You use input widgets like
sliderInput() or textInput() in the UI, and then use input$widgetId in the server to react to what the user selects or types.Click to reveal answer
beginner
What function runs a Shiny app?
The function
shinyApp(ui, server) runs the app by connecting the UI and server parts together.Click to reveal answer
Which two components are essential to build a Shiny app?
✗ Incorrect
A Shiny app needs a UI to show the interface and a server to handle the logic.
What does the function
sliderInput() do in Shiny?✗ Incorrect
sliderInput() creates a slider widget so users can pick a number by sliding.How do you access the value of an input widget named 'age' in the server function?
✗ Incorrect
Input values are accessed using
input$widgetId, so here it is input$age.Which function is used to create a fluid and responsive UI layout in Shiny?
✗ Incorrect
fluidPage() creates a flexible layout that adjusts to screen size.What does the
server function in Shiny do?✗ Incorrect
The server function contains the code that reacts to user input and updates outputs.
Explain the roles of the UI and server parts in a Shiny app.
Think about what the user interacts with versus what happens behind the scenes.
You got /4 concepts.
Describe how you would create a simple Shiny app that takes a number input and shows it doubled.
Focus on input widgets, accessing input, and showing output.
You got /4 concepts.