| # 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) | |