Shiny Exercise 1
New Shiny App
Create a new shiny app.
- In R script, start typing
shinyapp
and select theshinyapp
snippet.
library(shiny)
<- fluidPage(
ui
)
<- function(input, output, session) {
server
}
shinyApp(ui, server)
- Save the file and click the “Run App” button. You should see a blank app and no errors!
- Add some text inside the ui element, e.g., “Hello World!”. Save and click the “Reload App” button”.
Click to Check the Complete Shiny App Code!
library(shiny)
<- fluidPage(
ui "Hello world!"
)
<- function(input, output, session) {
server
}
shinyApp(ui, server)