Configuring R

If you want to use R with Data Science Studio, you will first need to install R and a few packages:

  • RJSONIO
  • httr

Additionally, you need to install a Python package for the R interactive notebook

Ubuntu / Debian procedure

Note

You need R version 3. On Debian 7, you will need to install some additional backports repositories for that.

  • Install the required developement packages
(as root) # apt-get install r-base r-base-dev libcurl4-openssl-dev python-dev
  • As the user running Data Science Studio, run a R console
% R
  • At the R prompt
> install.packages("RJSONIO")
> install.packages("httr")
  • When asked about a personal library, answer yes
  • Select a mirror near you
  • Once the packages are compiled and installed, exit the R prompt
> q()
  • Go to the DSS data directory and run the following command
./bin/pip install rpy2 singledispatch
  • Restart Data Science Studio. Go to the Studio data directory and
./bin/dss restart

RedHat / CentOS procedure

  • Install the required development packages
(as root - v6.x) # yum install R-core R-devel libcurl-devel python27-devel readline-devel
(as root - v7.x) # yum install R-core R-devel libcurl-devel python-devel readline-devel

Note

The R packages are found in the EPEL (Extra Packages for Enterprise Linux) software repository, which is configured as part as the standard Data Science Studio installation on these distributions.

  • As the user running Data Science Studio, run a R console
% R
  • At the R prompt
> install.packages("RJSONIO")
> install.packages("httr")
  • When asked about a personal library, answer yes
  • Select a mirror near you
  • Once the packages are compiled and installed, exit the R prompt
> q()
  • Go to the DSS data directory and run the following command
./bin/pip install rpy2 singledispatch
  • Restart DSS. Go to the Studio data directory and
./bin/dss restart

Mac OS X procedure

  • Install R from http://www.r-project.org/. Note that you might need to also install XQuartz
  • As the user running Data Science Studio, run a R console
  • At the R prompt
> install.packages("RJSONIO")
> install.packages("httr")
  • When asked about a personal library, answer yes
  • Select a mirror near you
  • Once the packages are compiled and installed, exit the R prompt
> q()
  • Go to the DSS data directory and run the following command
cd "$HOME/Library/DataScienceStudio/dss_home"
./bin/python bin/pip install rpy2 singledispatch
  • Exit DSS using the Dock icon
  • Start DSS