forked from rstudio/shiny
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrunApp.Rd
57 lines (49 loc) · 1.56 KB
/
runApp.Rd
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
\name{runApp}
\alias{runApp}
\title{Run Shiny Application}
\usage{
runApp(appDir = getwd(), port = NULL,
launch.browser = getOption("shiny.launch.browser", interactive()),
workerId = "", quiet = FALSE)
}
\arguments{
\item{appDir}{The directory of the application. Should
contain \code{server.R}, plus, either \code{ui.R} or a
\code{www} directory that contains the file
\code{index.html}. Defaults to the working directory.}
\item{port}{The TCP port that the application should
listen on. Defaults to choosing a random port.}
\item{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.}
\item{workerId}{Can generally be ignored. Exists to help
some editions of Shiny Server Pro route requests to the
correct process.}
\item{quiet}{Should Shiny status messages be shown?
Defaults to FALSE.}
}
\description{
Runs a Shiny application. This function normally does not
return; interrupt R to stop the application (usually by
pressing Ctrl+C or Esc).
}
\examples{
\dontrun{
# Start app in the current working directory
runApp()
# Start app in a subdirectory called myapp
runApp("myapp")
# 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)) })
}
))
}
}