R Installation

image_pdfimage_print

R is a free software environment for statistical computing and graphics, and it is compatible with Jedox software. The R installation process allows you to perform R integration on Windows and Linux systems. The most recent tested release is R-3.6.1.

Note: Linux installation is very similar to Windows installation, but may differ depending on the flavor of Linux that is running.

Step 1: download and install R
  1. Download of R for all platforms from http://www.r-project.org/. For Windows specifically, you can also go to https://cran.r-project.org/bin/windows/base/. For both Windows and Linux, select the 64-bit option.
  2. Start the installer. The installation of R must be done on the same system as the Jedox Suite.

For Linux installation: the R package must be installed in changeroot (chroot):

  1. From outside the cage, switch to the cage with the command
    cd /opt/jedox/ps
  2. Then start Jedox with the command
    sudo ./jedox-suite.sh start
  3. From inside the cage, switch to chroot with the command
    sudo chroot .
Step 2: install R-package rJava (R to Java interface)
  1. Start the R console as an administrator. If you do not start the R console as an administrator, you may get an error message regarding insufficient authorization.
    Enter the command

    install.packages('rJava')

  2. Choose a CRAN mirror closest to your location to complete the installation.

If the installation cannot be performed as above, try performing the following steps.

  1. Download the Windows binary corresponding to the R version (the file rJava*.zip) from http://www.rforge.net/rJava/files/.
  2. Start the R console.
  3. In the R console, enter the command
    install.packages(file.choose())
  4. A message is displayed, asking if you would like to use a personal library instead. Select No.
  5. In the File Picker, choose the downloaded file rJava*.zip.
Step 3: set the system environment variables
  1. Create a system environment variable called PATH and enter the path to the R executable directory. For example, in a 64-bit Tomcat installation on Windows, the R path may be C:\Program Files\R\R-3.6.1\bin\x64. A Linux path is similar, and varies based on the flavor of Linux in use.
  2. Create a system environment variable called R_HOME for the R installation directory, e.g.: R_HOME=C:\Program Files\R\R-3.6.1 (Windows) or R_HOME =/usr/lib64/R (Linux).
Step 4: change Tomcat configuration for Jedox Integrator

Linux: in the file /opt/jedox/ps/tomcat-etl/setenv.sh, add the following line:
export R_HOME=/usr/lib64/R

Windows: in the file \tomcat\bin\setenv.bat, verify that the line starting with set Library_Path looks like this:

set Library_Path=%R_HOME%\library\rJava\jri\x64

If you need to define several directories for the Library_Path setting, the entries should be separated by the character sequence  ';'
For example:
set Library_Path=%R_HOME%\library\rJava\jri\x64';'C:\Program Files (x86)\Jedox\Jedox Suite\tomcat\webapps\etlserver\WEB-INF\lib\auth\x64

Step 5: remove and reinstall Tomcat service (Windows only)

Run the batch files ServiceRemove.bat and ServiceInstall.bat in the ..\tomcat\bin directory. 

As a final step in Windows, you must start the Jedox Tomcat service.

Related links:
image_pdfimage_print