Description Usage Arguments Details Value Examples
Runs a Shiny application. This function normally does not return; interrupt R to stop the application (usually by pressing Ctrl+C or Esc).
1 | run_resize(launch.browser = TRUE, ...)
|
launch.browser |
If true, the system's default web browser will be launched automatically after the app is started. Defaults to true in interactive sessions only. This value of this parameter can also be a function to call with the application's URL. |
... |
Arguments passed on to
|
The host parameter was introduced in Shiny 0.9.0. Its default value of
"127.0.0.1"
means that, contrary to previous versions of Shiny, only
the current machine can access locally hosted Shiny apps. To allow other
clients to connect, use the value "0.0.0.0"
instead (which was the
value that was hard-coded into Shiny in 0.8.0 and earlier).
Nothing.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | ## Not run:
# Start app in the current working directory
runApp()
# Start app in a subdirectory called myapp
runApp("myapp")
## End(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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.