https://github.com/rstudio/shiny_example
Example shiny app
https://github.com/rstudio/shiny_example
Last synced: 5 months ago
JSON representation
Example shiny app
- Host: GitHub
- URL: https://github.com/rstudio/shiny_example
- Owner: rstudio
- Created: 2013-01-23T01:28:00.000Z (about 12 years ago)
- Default Branch: main
- Last Pushed: 2022-06-18T02:27:24.000Z (almost 3 years ago)
- Last Synced: 2024-08-13T07:11:07.695Z (8 months ago)
- Language: R
- Size: 2.93 KB
- Stars: 26
- Watchers: 65
- Forks: 54
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - rstudio/shiny_example - Example shiny app (R)
README
# Example Shiny app
This is an example application for Shiny.
The main purpose of this example is to illustrate how to run Shiny apps from a remote source.
There are many ways to download and run it:```R
library(shiny)# Easiest way is to use runGitHub
runGitHub("shiny_example", "rstudio")# Run a tar or zip file directly
runUrl("https://github.com/rstudio/shiny_example/archive/master.tar.gz")
runUrl("https://github.com/rstudio/shiny_example/archive/master.zip")
```Or you can clone the git repository, then use `runApp()`:
```R
# First clone the repository with git. If you have cloned it into
# ~/shiny_example, first go to that directory, then use runApp().
setwd("~/shiny_example")
runApp()
```To run a Shiny app from a subdirectory in the repo or zip file, you can use the `subdir` argument. This repository happens to contain another copy of the app in `inst/shinyapp/`.
```R
runGitHub("shiny_example", "rstudio", subdir = "inst/shinyapp/")runUrl("https://github.com/rstudio/shiny_example/archive/master.tar.gz",
subdir = "inst/shinyapp/")
```