Case Studies: Building Web Applications with Shiny in R
Dean Attali
Shiny Consultant
Assumes basic Shiny knowledge
Review important Shiny concepts
Develop multiple apps for real-life scenarios
Repetitive practice of essential features to increase familiarity
Learn new features and best practices
library(shiny)
ui <- fluidPage()
server <- function(input, output) {}
shinyApp(ui = ui, server = server)
Load the shiny package
Create a webpage with fluidPage()
- UI of a Shiny app
Create server portion of the app - where application logic lives
Combine UI + server into a Shiny app and run it
Add text as argument to fluidPage()
ui <- fluidPage(
"Hello there"
)
Result: webpage with text "Hello there"
fluidPage()
accepts arbitrary # of argumentsui <- fluidPage(
"Hello",
"there"
)
h1()
h2()
strong()
em()
Bold
Italicized (emphasized)
ui <- fluidPage(
h1("SHINY COURSE"),
"by",
strong("Dean Attali"),
)
by Dean Attali
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
"This is the sidebar"
),
mainPanel(
"Main panel goes here"
)
)
)
Case Studies: Building Web Applications with Shiny in R