Skip to Content
Author's profile photo Former Member

Installing and Configuring R on Windows 7 using SAP Predictive Analysis 1.0.7

If you have downloaded and installed SAP Predictive Analysis 1.0.7, you can install and configure R using the solution.

Read the attached document on how you can do that.

It also contains troubleshooting tips in case you run into any issues.

Also, if you would like to download and install R 2.15.1 yourself on your system, please read through http://scn.sap.com/docs/DOC-28396/ to do the same.

Happy analysis!!

P.S: Its an XML Word document which can open in Word.

Thanks,

Vishwa

Assigned Tags

      27 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Vishwanath Belur,

      I've followed these instructions using SAP PA 1.0.1 and R 2.11 on x64 - however, the folder structure on the R site has changed and x64 packages are no longer available from those links.

      Can you please let me know where I can find them to get the R-integration working with PA?

      Secondly, might be worth updating the document?

      Kind regards,

      Josh

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Thanks Joshua for pointing this out.

      Yes, we got to know recently that R 2.11.1 64-bit libraries have been moved. I will publish the updated version of the document soon.

      Author's profile photo Former Member
      Former Member

      Thanks Vishwanath Belur for your quick reply.

      I'd be happy to test the new version of the document as soon as you have it ready.

      Cheers, Josh

      Author's profile photo Former Member
      Former Member

      hey Vishwanath, any updates on the document yet?

      thanks,

      Josh

      Author's profile photo Former Member
      Former Member

      Gentlemen,

      R version 2.11 is way too outdated. How about support of the more recent ones? In fact, how about support of any R version? After all, SAP is making claims about "integration with R", not "integration with a particular 2 years old version that is out of support and misses essential libraries".

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Roman,

      New version of PA (1.0.7) is supporting R 2.15 along with 2.11. Infact, it also provides an option for customers to download and install R 2.15 in the product.

      Hope this helps.

      Author's profile photo Former Member
      Former Member

      Thanks Vishwanath!

      Btw, are there any plans to allow using both R and HANA related algorythms in the same Analysis process?

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Currently, we differentiate the In database analysis with In process analysis using the data source that is selected. Currently, we have no plans to allow mixing algos from two sources.

      Author's profile photo Former Member
      Former Member

      Wait a moment. Do I understand it right from the How-To file that only R 2.15.1 is now supported, not, say, 2.15.2 which is the main download option on CRAN?

      Or, should the answer be "alwsys let Predictive Analysis to install R"?

      Author's profile photo Former Member
      Former Member

      I don't know if they did it intentionally, but I installed R 2.15.2 and is working "fine" with PA 1.0.7.

      What I can't get to work is the integration with HANA algorithms after HANA SPS05 changes.

      And regarding the other question you had, I don't think you can mix Hana and R algorithms in the same analysis in PA. Since it only shows the available algorithms regarding your data source. Hope this changes in the future.

      Do you know if you can throw R code to SAP PA?

      Regards

      Kael

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      It "works" with R 2.15.2 but the supported version is 2.15.1.

      There were some changes in the HANA PAL APIs in SPS5 because of which PA 1.0 SP7 does not work with HANA SPS5. There is an SAP note on the same.

      We have the item for running any R script from PA console in our roadmap.

      external facing Roadmap slides are available in SMP here: https://websmp201.sap-ag.de/~sapidb/011000358700001160102012E.pdf

      -Vishwa

      Author's profile photo Former Member
      Former Member

      Hi Kael, did you use the latest versions of the required libraries for PA? I am going to give it another try.

      And yes, I've been told somewhere here on SCN by the PA developers that the current release of PA can only work with HANA SPS03 or something like that. The next release of PA will hopefully with with the HANA SPS05

      Author's profile photo Former Member
      Former Member

      I am getting an error while installing Predictive Analysis, (PA install from SMP -> 51044831   SP07 for SAP PREDICTIVE ANALYSIS 1.0 64B).

      After the screen where I allow SAP AG to make changes to my computer, I get an error stating that: "Installer has detected that a previous operation did not complete under another user. Program will exit".

      I ran the install as admin and as myself. I installed R 2.15.1 (64) and Java 7 update 10 (64), prior to trying to install PA. Any suggestions?

      Thank you

      Author's profile photo Former Member
      Former Member

      Have you try to delete all R folders?

      Author's profile photo Former Member
      Former Member

      I was able to complete PA install. It required deleting some
      registry keys for Visual Intelligence. Apparently uninstall process didn’t clean
      it properly. I am able to use PA but not with R. When I tried to configure R
      for PA I get an error referring to directory permissions. Unfortunately, I am
      not able to change those permissions. I worked with support and they were not
      able to do that either. They think that maybe I need the key for PA, I am using
      the version with 30 day access.  

      Author's profile photo Former Member
      Former Member

      Can you install the packages directly from R? Do you have that permission?

      I also used the 30 days version and I could run analysis.

      Author's profile photo Former Member
      Former Member

      Don't hesitate to contact me directly if you think I could help you.

      Author's profile photo Former Member
      Former Member

      I installed R outside of PA and R seems to be fine. The
      issue was that when I tried to use R in PA I got an error that R is not
      configured for PA. I tried to configure it but it didn’t like it so I decided
      to install R again through PA. I uninstalled R that I already had first and
      then I tried to re-install it through PA. At the end of the process I got a
      message that R was installed but packages where not configured because I don’t
      have proper authorization to folders. I looked through troubleshooting document
      and found the same error that I got with a note that I need to change the directory
      permission on C:\Users\Public\R-2.15.1\library. Admin account has all the privileges
      on that dir so I assume they mean “CREATOR OWNER” account.
      Unfortunately, for some reason I am not able to change that authorization. I
      will try to find more time tomorrow to look into this again.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Please use the SAP note here to solve this problem with R package installation.

      http://service.sap.com/sap/support/notes/1796831

      Let me know if it works.

      Author's profile photo Former Member
      Former Member

      but if you keep the R version fixed this solution will easily suffer incompatibility problems between the R version and the upgraded packages (you always get this alerter in R). A solution would be to include a link to the suitable version of the packages in the standard installation procedure.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      We have fixed this in the next release of the product (to be available in this quarter) where the R packages would be retrieved using the R command. Hence, there will be no compatibility issues.

      -Vishwa

      Author's profile photo Former Member
      Former Member

      Will it  be already possible to submit my own R code and install other packages than the recommended ones?

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      No. That is not possible today, but, it is part of the roadmap for PA.

      Author's profile photo Former Member
      Former Member

      Yes, that works.

      Thank you for your help.

      I am able to use PA with R.

      zb

      Author's profile photo Former Member
      Former Member

      Hi Vishwanath Belur,

      I have installed Predictive Analysis 1.0.11 in my sytem.

      I already had R 3.0.0, however, for the tool purpose I have installed R 2.15.1 and tried to configure for that.

      But now it's throwing the error message

      "Error: R.dll version doesn't match, (DLL 2.15.1; expecting 3.0.0)".

      I tried uninstalling R3.0.0 completely, but still the problem persists.

      Please let me know how to fix this?

      Thanks,

      Arindam

      Author's profile photo Arvind Elayappan
      Arvind Elayappan

      Please follow the below process:

      The SAP PA 1.0.11 is installed [assuming it is correctly done]

      You do not have to install R 2.15.1 if you are installing 3.0; Un-install all R installation; make sure you go to the installation path and delete all trails of the folders installed.

      Now install R 3.0.2;

      In the File> Preference> please make sure you link the path to the R-libraries; the paths are different please make sure you move the R libs to the installation path.

      the new version of R installs packages by default in the users\R\library folder rather than in the C:\program files\R library where PA looks for it, so we've found the extra step of moving the installed packages is needed with recent installations.

      You might get other errors like rJAVA installation when the required R libraries are not installed in the expected location [you get this when executing the Algorithms]. Check and make sure that all 10 required packages are installed in the library directory of the path you installed R, All 10 packages have to be in c:\Program Files\R\R-3.0.1\library if this is the path mentioned in File> Preference>

      Capture.PNG

      Once you have un-installed both the versions and have deleted the trail, please follow Vishwa's

      http://scn.sap.com/docs/DOC-28396  [mentioned above]

      If you encounter rjava error while executing the algorithm, please visit

      http://scn.sap.com/thread/3434417

      Author's profile photo Former Member
      Former Member

      Hi Arvind,

      I've installed the R 2.15.1 & downloaded all the packages separately (not from SAP UI).

      Also I have uninstalled all other version (including their respective folders too).

      After I do all configuration I can see all algorithms to be there, but while executing I'm getting the Error message related to the dll.

      I'm not able to see any option to provide R paths in the  "File> Preference"

      Did you mean "File>install & configure R"?? I did that correctly only.