# Using shiny apps

HOME

To run a shiny app, you need to have a recent version of R (at least version 3.0.0) installed. You also need the 'shiny' package, which you can install from the internet with

install.packages("shiny")

A number of other packages which shiny needs will also be installed.

Open an R session and attach the shiny package with

library(shiny)

The easiest way to open an app which is available on the web as a ZIP file, is to use

runUrl("path_to_zip_file.zip")

for example

runUrl("http://mikemeredith.net/blog/201502/visBeta.zip")

If you get this error, download the .zip file manually: highlight the link in the web page, right click and select "Save link as...". Extract all the files to a new folder, preferably with the same name, so "visBeta.zip" produces a folder called "visBeta". The folder must contain scripts called "ui.R" and "server.R", and possibly other scripts and subfolders.

Move this folder to the default folder for your R session OR change the default folder (with File > Change dir... or in RStudio: Session > Set working directory...) to the folder containing the "visBeta" folder.

Launch the app with runApp and the name of the folder, for example

runApp("visBeta")

Updated 17 Feb 2015 by Mike Meredith