Configuring an open-source R engine

To use an open-source R engine with Spotfire Statistics Services, rather than the TERR™ engine provided with the installation, you must perform additional configuration steps.

Spotfire Statistics Services version 10.10.1 was tested with open-source R version 3.6.2 and version 4.0.0.
Important: Remember that when installing and configuring Spotfire Statistics Services to use a statistical engine, consider the configurations and strategies to restrict access. See Recommendations for safeguarding your environment for detailed information.
Note: Open-source R is available under separate open source software license terms and is not part of TERR. As such, open-source R is not within the scope of your license for TERR. Open-source R is not supported, maintained, or warranted in any way by TIBCO Software Inc. Download and use of open-source R is solely at your own discretion and subject to the free open source license terms applicable to open-source R.

Procedure

  1. Open the spserver.properties file from the following location:
    • Cluster: SPSERVER_SHARE/conf
    • Standalone: SPSERVER_HOME/conf
  2. Set the property engine.type=R.
  3. Download and install the tested version of open-source R, as listed on the Systems Requirements page, available from TIBCO Spotfire® Products System Requirements.
    You can download open-source R from http://www.r-project.org/.
    Note: If you plan to build open-source R from source, it must be configured with the option –-enable-R-shlib. If you are downloading a distribution, this option was likely included in the build process.
  4. Install the rJava package.
    1. Start an open-source R desktop session.
    2. In the open-source R Console, type install.packages("rJava", install_path) where install_path is the library path where open-source R running under Spotfire Statistics Services expects to find it. For example, it might be C:/Program Files/R/R-4.0.0/library.
      Note: If you do not supply a path for this argument, you might encounter problems using rJava.
    3. Select a CRAN mirror, and then open-source R installs the rJava package.
    4. Validate the rJava installation in the R console by running the following command:
      library(rJava)
  5. Perform the following to include the path to the open-source R installation
    Environment Description
    Windows Add -Dspserver.rhome=path-to-R to the Java options for the service. For more information, see Using Procrun to modify a Java property.
    Note: The path-to-R where you installed open-source R, at the level of its version number, and no lower (for example, R-N.n.n).

    See the following examples.

    -Dspserver.rhome=C:\Program Files\R\R-4.0.0
    or
    -Dspserver.rhome=C:\R\R-4.0.0

    If jobs fail, and you see the following error in SplusServer.log, the path you provided in -Dspserver.rhome to your installation of open-source R is incorrect.

    java.lang.IllegalStateException: Required R executable file is not found

    UNIX/Linux Edit SPSERVER_HOME/init.d/spserver to specify SPSERVER_RHOME=path-to-R.
  6. Restart Spotfire Statistics Services.