Last active
July 27, 2023 10:31
-
-
Save ageller/092f9d95f2e3b67bd7deb2ac3982fa59 to your computer and use it in GitHub Desktop.
typical Shiny app skeleton
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import libraries | |
library(shiny) | |
# possibly read in some data to be used below | |
# define the UI | |
ui <- fluidPage( | |
# app title | |
headerPanel("My Title"), | |
# sidebar panel for inputs | |
sidebarPanel( | |
# add dropdowns, sliders, checkboxes, radio buttons, etc. | |
), | |
# main panel for displaying outputs | |
mainPanel( | |
# add text, plots, etc | |
) | |
) | |
# define server logic | |
server <- function(input, output) { | |
# make use of any of the inputs that came from the sidebarPanel | |
# generate output text, plots, etc. that will be shown in the mainPanel | |
} | |
# start the app | |
shinyApp(ui, server) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment