BookmarkSubscribeRSS Feed

The Open Source Integration node installation cheat sheet

Started ‎12-18-2014 by
Modified ‎11-13-2018 by
Views 8,992

The Open Source Integration node enables you to run statements and programs from the R language inside a SAS® Enterprise Miner™ workflow. As some of you have noticed, R and Enterprise Miner are vastly different data analysis platforms and making them play nicely with one another can sometimes require extra configuration steps. You can use this tip as a cheat sheet to find information from many different places about installing and configuring the Open Source Integration node.

 

1.) Choosing the Recommended Version of R

 

Enterprise Miner does not ship with R. You have to install it yourself. So what version of R should you install? That depends on which version of Enterprise Miner you have and what you want to do with the node.

Using the Open Source Integration node in PMML output mode allows you to create SAS DATA step score code from a small number of R packages. You can use the Open Source Integration node in Merge and None output modes for many types of tasks in R, but you cannot generate SAS DATA step score code with Merge and None output modes. If you don’t need the node to create SAS DATA step score code using PMML output mode, then you can probably use many different versions of R, but the versions below are recommended.

 

Recommended versions of R:

  SAS Enterprise Miner version

  Recommended versions of R   Required Version of PMML Package
  13.1   2.13.0-3.0.2

  pmml_1.4.1

  13.2   2.15.3-3.0.3   pmml_1.4.1
  14.1   3.0.1-3.1.2   pmml_1.4.2

 

 

2.) Installing R on Linux

 

Because of a very technical issue with the way R is packaged by major Linux distributions, installing R on Linux for use with Enterprise Miner can be tricky. If you are running Enterprise Miner on Linux and seeing errors like:

 

ERROR: SAS could not initialize the R language interface.

 

Then we suggest you follow the instructions available through the SAS support page link below.

 

Special instructions for installing R on Linux:

 

These instructions explain how to build R from source code and set the R_HOME environment variable.

 

3.) Setting the R_HOME Environment Variable

 

If you are seeing errors like:

 

ERROR: SAS could not initialize the R language interface.

 

Then you may also need to set the R_HOME environment variable.

 

To set the R_HOME environment variable on Windows, follow these instructions from CRAN: http://cran.r-project.org/bin/windows/base/rw-FAQ.html#How-do-I-set-environment-variables_003f

 

To set the R_HOME environment variable on Linux, follow these instructions these instruction from SAS: http://support.sas.com/documentation/installcenter/en/iktkintrii/64028/PDF/default/install.pdf

 

4.) The RLANG System Option

 

If you are seeing errors like:

 

ERROR: The RLANG system option must be specified in the SAS configuration file or on the SAS invocation command line to enable the submission of R language statements.

 

Then you must specify the RLANG system option when SAS is starting up. To do so, you should probably add the “-RLANG” option to the main SASV9.CFG configuration file on the SAS Server. For more information about the RLANG system option, check out these SAS support pages:

 

 

5.) Installing the PMML Package

 

If you are using PMML output mode and seeing errors like:

ERROR: R: Error in library(‘pmml’) : there is no package called ‘pmml’

 

Then you need to install the R package: pmml-1.4.1. You can try to install this package from an R 2.15.3 session by issuing the R command:

 

install.packages("pmml", dependencies=TRUE)

 

If you have installed the PMML package and you see errors like:

 

ERROR: Given PMML File is not well formed or correct, error near line number: 2.

 

OR

 

After PMML translation, SYSCC = 10

 

Then you have probably installed the pmml-1.4.2 package by accident. You will need to uninstall this package and reinstall the required pmml-1.4.1 package. You may have to do this manually. To install an R package manually, you typically download the source code of the package and build it from the operating system command line by issuing:

 

> R CMD INSTALL /path/to/downloaded package

 

For more information about installing an R package manually check out these pages from CRAN:

http://cran.r-project.org/doc/manuals/r-release/R-admin.html#Installing-packages

https://stat.ethz.ch/R-manual/R-devel/library/utils/html/INSTALL.html

 

For more information on using the pmml-1.4.1 package in SAS Enterprise Miner take a look at SAS Usage Note 53794: http://support.sas.com/kb/53/794.html

 

 

There are other cases in which Enterprise Miner cannot locate installed R packages. This seems to occur when packages are installed to different directories based on the R interface or the user running R. If you have installed the correct PMML package for your version of Enterprise Miner, but still receive error messages like:  

 

ERROR: R: Error in library(‘pmml’) : there is no package called ‘pmml’

 

OR

 

After data transfers and R code submission SYSCC= 1012. Please see the log for more details.

 

Then try setting the R_LIBS environment variable to ensure all R interfaces and R user packages are being installed to a uniform location.

 

Summary

 

Because R and Enterprise Miner are such different technologies, sometimes you may need to take some extra steps to make them to work together. If you have completed all the steps in this cheat sheet and are still having problems, then you may need to contact SAS technical support: http://support.sas.com/techsup/.  

 

 

Version history
Last update:
‎11-13-2018 11:58 AM
Updated by:

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags