Last active
February 24, 2021 04:09
-
-
Save jdesilvio/eb47317b8473a21adf87 to your computer and use it in GitHub Desktop.
Template for a basic R Shiny app
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) | |
########## | |
# SERVER # | |
########## | |
#generic line initiating the SERVER | |
server <- shinyServer(function(input, output) { | |
######################### | |
# Data load and cleanup # | |
######################### | |
#Import data | |
#Clean data | |
############# | |
# Reactives # | |
############# | |
# define any reactive elements of the app | |
#Close the server definition | |
}) | |
################## | |
# User Interface # | |
################## | |
#generic line initiating the UI | |
ui <- shinyUI(fluidPage( | |
#Add a title | |
titlePanel("Add Title Here"), | |
#This creates a layout with a left sidebar and main section | |
sidebarLayout( | |
#beginning of sidebar section | |
#usually includes inputs | |
sidebarPanel(), | |
#beginning of main section | |
mainPanel() | |
) | |
#Close the UI definition | |
)) | |
############## | |
# Launch App # | |
############## | |
#generic line that launches the app | |
shinyApp(ui = ui, server = server) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment