runUrl()
downloads and launches a Shiny application that is hosted at
a downloadable URL. The Shiny application must be saved in a .zip, .tar, or
.tar.gz file. The Shiny application files must be contained in the root
directory or a subdirectory in the archive. For example, the files might be
myapp/server.r
and myapp/ui.r
. The functions runGitHub()
and runGist()
are based on runUrl()
, using URL's from GitHub
(https://github.com) and GitHub gists (https://gist.github.com),
respectively.
runUrl(url, filetype = NULL, subdir = NULL, destdir = NULL, ...) runGist(gist, destdir = NULL, ...) runGitHub( repo, username = getOption("github.user"), ref = "master", subdir = NULL, destdir = NULL, ... )
url | URL of the application. |
---|---|
filetype | The file type ( |
subdir | A subdirectory in the repository that contains the app. By
default, this function will run an app from the top level of the repo, but
you can use a path such as |
destdir | Directory to store the downloaded application files. If |
... | Other arguments to be passed to |
gist | The identifier of the gist. For example, if the gist is
https://gist.github.com/jcheng5/3239667, then |
repo | Name of the repository. |
username | GitHub username. If |
ref | Desired git reference. Could be a commit, tag, or branch name.
Defaults to |
## Only run this example in interactive R sessions if (interactive()) { runUrl('https://github.com/rstudio/shiny_example/archive/master.tar.gz') # Can run an app from a subdirectory in the archive runUrl("https://github.com/rstudio/shiny_example/archive/master.zip", subdir = "inst/shinyapp/") } ## Only run this example in interactive R sessions if (interactive()) { runGist(3239667) runGist("https://gist.github.com/jcheng5/3239667") # Old URL format without username runGist("https://gist.github.com/3239667") } ## Only run this example in interactive R sessions if (interactive()) { runGitHub("shiny_example", "rstudio") # or runGitHub("rstudio/shiny_example") # Can run an app from a subdirectory in the repo runGitHub("shiny_example", "rstudio", subdir = "inst/shinyapp/") }