ComeçarComece de graça

Simple text

Every Shiny app has a UI (User Interface) portion and a server portion. The UI is where the visual elements are placed—it controls the layout and appearance of your app. The server is where the logic of the app is implemented—for example, where calculations are performed and plots are generated.

An empty UI is created using the fluidPage() function. Adding text to a Shiny app is done by adding text inside fluidPage() as an argument. In fact, the entire UI is built by supplying the fluidPage() function with as many arguments as you want.

Este exercício faz parte do curso

Case Studies: Building Web Applications with Shiny in R

Ver curso

Instruções do exercício

Create a Shiny app that displays the text "Shiny is fun" by following these specific instructions:

  • Load the shiny package.
  • Create the UI for the Shiny app using the fluidPage() function.
  • Add the text "Shiny is fun" to the UI.

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Load the shiny package
___

# Define UI for the application
ui <- ___(
  # Add the text "Shiny is fun"
  ___
)

# Define the server logic
server <- function(input, output) {}

# Run the application
shinyApp(ui = ui, server = server)
Editar e executar o código