Note
Interactivity comes at a cost: some computer (the server) needs to be online to run the calculations and present the output.
Recently, the webR project made it possible to run code directly in the browser, without a dedicated server, but the technology is still in its infancy.
app.R
app.R
has three components:
ui
) objectserver
functionshinyApp
functionlibrary(shiny)
# See above for the definitions of ui and server
ui <- ...
server <- ...
shinyApp(ui = ui, server = server)
Run shiny::runExample(“01_hello”) in RStudio and explore the app.
ui
server
ui
()
.Carlos Matos // ISPUP::R4HEADS(2023)