# NOT RUN {
# Start app in the current working directory
runApp()
# Start app in a subdirectory called myapp
runApp("myapp")
# }
# NOT RUN {
## Only run this example in interactive R sessions
if (interactive()) {
  options(device.ask.default = FALSE)
  # Apps can be run without a server.r and ui.r file
  runApp(list(
    ui = bootstrapPage(
      numericInput('n', 'Number of obs', 100),
      plotOutput('plot')
    ),
    server = function(input, output) {
      output$plot <- renderPlot({ hist(runif(input$n)) })
    }
  ))
  # Running a Shiny app object
  app <- shinyApp(
    ui = bootstrapPage(
      numericInput('n', 'Number of obs', 100),
      plotOutput('plot')
    ),
    server = function(input, output) {
      output$plot <- renderPlot({ hist(runif(input$n)) })
    }
  )
  runApp(app)
}
# }
Run the code above in your browser using DataLab