Skip to Content

Hi Guys

This blog basically addresses some of the basic challenges and issues which many of us are facing when we do R integration with SAP PA. Yes SAP Predictive Analytics does provides us this smart feature of R integration which is a very well-known statistical based language. But sometimes some challenges which I am discussing below might come while doing this integration.

Problem 1: You have installed SAP PA but when you go to install R, sometimes an error message may come which won’t allow you to install and configure R internally.

/wp-content/uploads/2015/08/adf_779307.png

/wp-content/uploads/2015/08/ds_779308.png

Solution:

You have to install R manually and configure it with SAP PA. Below are the steps you can follow:

Step1:

If you are on a 64-bit Windows 7, make sure that you have a 64bit JRE and if you are on a 32-bit Windows 7, ensure that you have 32-bit JRE.

To check the version of JRE, run “java –version” on the command prompt.

/wp-content/uploads/2015/08/ds_779308.png

Step2:

Download & Install R from the following location

https://cran.r-project.org/bin/windows/base/old/3.1.2/

Step3:

After installing R, you need to install the R packages used by SAP Predictive Analysis 2.2 .

Below are the list of packages that are required.

  1. rJava
  2. RODBC
  3. RJDBC
  4. DBI
  5. monmlp
  6. AMORE
  7. XML
  8. pmml
  9. arules
  10. caret
  11. reshape
  12. plyr
  13. foreach
  14. iterators

These packages either you can download the zip files from- https://cran.r-project.org/bin/windows/base/old/3.1.2/ and install it. Or the second way is install it directly from the internet via R GUI Console . In the below snapshot you can see the two highlighted box, one is for installing packages from local zip files and the other one saying Install packages is for downloading packages from internet.

Untitled.png

Step4:

To test if the required packages are installed correctly, Go to

  • Start->Programs->R->R3.1.2
  • In the command prompt, type library (rJava) .Press enter. It is successfully installed if you don’t see any error

Eg : > library(rJava)

  • Try this for all the packages for confirmation

Step5:

Go to SAP PA Expert mode Install and Configure R option. As shown below there will be a predefined default path for R installation folder, change it to the path where you have installed R.Then go back to Installation tab and click again on the install R option. Restart the tool, it should work now.

/wp-content/uploads/2015/08/dasas_779317.png

Problem2: Every time when you install some new package in R for making a new custom R algorithm, you have to make that new package installation reflect in your SAP PA Expert mode too otherwise your algorithm won’t work in SAP PA environment. While doing so you need to do the same step as step5 above. But some of the folks may get the below attached error :

Capture.PNG

Solution:

Go to configuration tab and change that default path to C:\Users\[Username]\.sappa and then click Install. Restart the tool, give it a try.

Problem3: One more common error is REngine Initialization Failed. This mostly occcurs when you run a model which is based on R algorithm not with SAP PA Expert Mode out of the box algorithms.

Solution:  In the Configuration tab change the default path to the path where you have installed your R gui and then go to installation tab and click on Install R option. Restart the tool after this and rerun the model.

/wp-content/uploads/2015/08/dasas_779317.png

Above are the few of the challenges I faced, if anyone has any feedback or anything to be added which can be useful to others, you are more than welcome to comment.

Hope this blog has been helpful.

Regards

Ranajay

To report this post you need to login first.

8 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply