RStudio in a Web Browser

Saturday February 21, 2015

The most annoying part of R workshops is installing software and downloading necessary files. With RStudio Server, workshop participants can skip all that entirely.

Here's what RStudio looks like running locally. To attain the setup shown, you need to install R, install RStudio, install necessary R packages, separately download necessary code and data, and navigate to the correct working directory.

RStudio running locally

Here's what RStudio looks like in a browser. To attain the setup shown, you go to a URL and log in.

RStudio in a browser

In a workshop, it's very nice to be able to start doing things with R without messing with setup. Somebody does have to set up the environment in advance though.

Setting up RStudio Server is very easy, especially if you're already familiar with Amazon Web Services (AWS):

For an in-person workshop, it can be effective to distribute login information on slips of paper like this:

workshop login information

I've led an introductory workshop with ten active participants on one EC2 m3.2xlarge, which runs at 56 cents per hour. For a larger group, I ran two m3.2xlarge machines and three c4.8xlarge machines ($1.856/hour). That used all my five elastic IP addresses and provided 124 vCPUs and 240 gigs of RAM. We had 94 active users and could probably have supported quite a few more without problems.

RStudio in the cloud is a great fit for workshops because it eliminates install and setup pain for participants. It lets you decouple the install process from other workshop activities. The experience of using RStudio in a browser is nice enough that it makes me wonder whether anyone offers cloud RStudio as a service—is that a business that should exist? Workshops certainly aren't the only place where RStudio Server could make sense.

There are also other options for setting up your server. You don't need to use Louis's AMIs; you don't need to use AWS at all. The Bioconductor Project maintains a Cloud AMI that comes with a lot of other pre-installed R packages, for example. (When I last checked it was based on an older version of Ubuntu.) For total control, you can install RStudio Server from scratch on whatever type of system you like.