Using RStudio Workbench / RStudio Server with Cloudera, Microsoft R, and Hadoop


RStudio Server is fully compatible with Microsoft R. However, some Microsoft R installations set important environment variables such as CLASSPATH and LD_LIBRARY_PATH in the R script itself (i.e. in /usr/bin/R). Since RStudio Server does not run that script, those environment variables won't be set in RStudio Server R sessions. 

To forward the environment variables to RStudio Workbench (previously RStudio Server Pro), follow these steps:

  1. Run Microsoft R from the command line, and then exit. Microsoft R creates a file in your home directory called with the correct environment variables.

  2. Copy the file from your home directory to /etc/rstudio/

  3. Add (or amend) the file /etc/rstudio/rsession-profile with the following content (adjusting the paths to suit your environment):
source /etc/rstudio/
source /opt/cloudera/parcels/MRO-8.0.5/lib64/R/bin/Revo-init

If you're not using RStudio Workbench, you can also set the necessary environment variables by creating a file called Details on where this file can be placed and its syntax are described in the R help topic Initialization at Start of an R Session.