RStudio IDE is an open source Integrated Development Environment for the statistical analysis program R. RStudio Server provides a web version of RStudio IDE that allows easy development on a VPS. Since our VPSs are billed by the hour, it's surprisingly cheap to spin up a 24 core instance, crunch some data, and then destroy the VPS.
First, install R, apparmor, and gdebi.
sudo apt-get install r-base libapparmor1 gdebi-core
Next, download and install the correct package for your architecture. On 32-bit Ubuntu, execute the following commands.
wget http://download2.rstudio.org/rstudio-server-0.97.336-i386.deb -O rstudio.deb
On 64-bit Ubuntu, execute the following commands.
wget http://download2.rstudio.org/rstudio-server-0.97.336-amd64.deb -O rstudio.deb
Install the package.
sudo gdebi rstudio.deb
It is not advisable to use the root account with RStudio, instead, create a normal user account just for RStudio. The account can be named anything, and the account password will be the one to use in the web interface.
sudo adduser rstudio
RStudio will use the user's home directory as it's default workspace.
RStudio can be access through port 8787. Any user account with a password can be used in RStudio.
Let's test that RStudio is working correctly by installing a quantitative finance package from CRAN, the R package repository.
Run the following command inside RStudio to install quantmod.
Next, let's test out RStudio's graphing capabilities by plotting the stock price of Apple. The graph will appear in the bottom right panel of RStudio.
library('quantmod') data <- new.env() getSymbols('AAPL', data) plot(data$AAPL)
To learn how to install R packages from CRAN and GitHub and how to ensure that these packages are made available for all users on the same Droplet, check out How To Set Up R on Ubuntu 14.04.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in our Questions & Answers section, find tutorials and tools that will help you grow as a developer and scale your project or business, and subscribe to topics of interest.Sign up
Click below to sign up and get $100 of credit to try our products over 60 days!