Skip to content

Instantly share code, notes, and snippets.

@davivc
Last active August 29, 2015 14:13
Show Gist options
  • Save davivc/33fdc6f2701bc6a51375 to your computer and use it in GitHub Desktop.
Save davivc/33fdc6f2701bc6a51375 to your computer and use it in GitHub Desktop.
library("shiny")
# Global variables can go here
n <- 200
# Define the UI
ui <- bootstrapPage(
numericInput('n', 'Number of obs', n),
plotOutput('plot')
)
# Define the server code
server <- function(input, output) {
output$plot <- renderPlot({
hist(runif(input$n))
})
}
# Return a Shiny app object
shinyApp(ui = ui, server = server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment