Skip to content

Instantly share code, notes, and snippets.

@maluta
Created November 26, 2018 13:01
Show Gist options
  • Save maluta/b844295eab5c7fe305f0592c9139bda9 to your computer and use it in GitHub Desktop.
Save maluta/b844295eab5c7fe305f0592c9139bda9 to your computer and use it in GitHub Desktop.
## app.R ##
server <- function(input, output) {
output$distPlot <- renderPlot({
hist(rnorm(input$obs), col = 'darkgray', border = 'white')
})
}
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
sliderInput("obs", "Number of observations:", min = 10, max = 500, value = 100)
),
mainPanel(plotOutput("distPlot"))
)
)
shinyApp(ui = ui, server = server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment