Skip to content

Tutorial for rna.wlu.edu users

whitwort edited this page Feb 15, 2013 · 10 revisions

Introduction

This quick tutorial is designed for users who already have RStudio accounts on rna.wlu.edu. If you need an account just ask!

Deploying Shiny applications on RNA.wlu.edu

This simulation is an application written on top of the Shiny server framework. RNA server is setup to allow R users to deploy Shiny applications right from their home directory.

To do this:

  1. After logging into rna/r, click on the files tab and navigate to the root of your home directory by clicking the Home link.
  2. If you don't see a folder named ShinyApps create one by clicking New Folder.
  3. Any subfolders you create here which contain Shiny application files (ui.R and server.R) will be automatically deployed to: http://rna.wlu.edu/shiny/users/[yourname]/[appname]

For example, if your username is joe and your application folder within ShinyApps is named my-app, your application will found at http://rna.wlu.edu/shiny/users/joe/my-app/ (at present, the trailing / is essential; this will be fixed in the near future).

Cloning and hacking this simulation

Here's how you can get a fresh copy of this simulation app to play around with; for this example we'll deploy our app to a subfolder named myModel:

  1. From the main menu select Tools and Shell.
  2. In the shell enter: git clone https://github.com/whitwort/bindingModel.git ~/ShinyApps/myModel

From the file tab navigate to ShinyApps -> myModel. This folder contains all of the code needed for the web user interface (ui.R), the backend R server (server.R) and the simulated model (model.R).

The code in model.R is designed to be easy to understand if you're familiar with R and easy to change to make a new app powered by a different model. If you need to add or tweak interface elements or visualizations you'll have to modify server.R and ui.R.

A excellent tutorial on the Shiny framework can be found here: http://rstudio.github.com/shiny/tutorial/.

Clone this wiki locally