first commit of web app

master
Aron Lindberg 2015-11-07 11:50:03 -05:00
parent 4a9b6e9fce
commit 34a3037325
2 changed files with 40 additions and 0 deletions

16
shiny-app/server.R Normal file
View File

@ -0,0 +1,16 @@
library(shiny)
# Define server logic required to draw a histogram
shinyServer(function(input, output) {
# Expression that generates a histogram. The expression is
# wrapped in a call to renderPlot to indicate that:
#
# 1) It is "reactive" and therefore should re-execute automatically
# when inputs change
# 2) Its output type is a plot
output$distPlot <- renderPlot({
plot(faithful$eruptions, faithful$waiting)
})
})

24
shiny-app/ui.R Normal file
View File

@ -0,0 +1,24 @@
library(shiny)
# Define UI for application that draws a histogram
shinyUI(fluidPage(
# Application title
titlePanel("Hello Shiny!"),
# Sidebar with a slider input for the number of bins
sidebarLayout(
sidebarPanel(
sliderInput("bins",
"Number of bins:",
min = 1,
max = 50,
value = 30)
),
# Show a plot of the generated distribution
mainPanel(
plotOutput("distPlot")
)
)
))