Last week, we released the new versions of SPSS Statistics (version 24) and SPSS Modeler (version 18). With the new product release we also have a new version of R Essentials available for both products. R has been integrated with SPSS Statistics since version 19 and Modeler since version 16. This integration allows for the creation of extensions, which are custom dialogs that allow you to use a GUI to execute R code in Statistics or Modeler. In the releases this week, a new feature for both products is the ability to download and install extensions from within the product. I am happy to announce that R Essentials can now be downloaded directly from GitHub.

Click here to find your version of R Essentials for SPSS Statistics

Click here to find your version of R Essentials for SPSS Modeler

Now I will walk through the installation of R Essentials for SPSS Modeler 18 and SPSS Statistics 24.

Install Guide for SPSS Modeler v18:

Previously, I wrote this blog post, which gives details on installing R Essentials in SPSS Modeler. I've included steps below for installing R Essentials for version 18 of Modeler with a couple extra tips.

  1. Install the correct version of R. For Modeler version 18 you will need to have R version 3.2.x installed on your machine. I downloaded this version here.
  2. Download and run R essentials from the Modeler R Essentials GitHub repository.
  3. When installing R Essentials, there are two file paths you will need to validate:
    • First, you need to indicate your R installation folder. My installer defaulted to R-3.2.1 but I have R-3.2.2 installed, so I needed to change it. If you try using an older version of R you will get an error message (I tried). install1
    • Next, you need to pick the right bin folder for your installation. This will be different based on where you installed Modeler. The installer defaults to the "ModelerServer" directory, but if you are not using Modeler Server this needs to be changed to the "Modeler" directory. The screen shot below shows the path that I used that was successful. install2
    • If everything was successful you should see this screen: install-confirm
  4. Now we have R installed and R Essentials installed. To do a quick test, let's open up Modeler 18
    • Add a User input node to the canvas and type something like 'a' into the Field and a number '1' in Values. This is dummy data just so we can run quick R code, if you already have a Source node on your canvas you can use that
    • From the Record Ops palette, add a R Transform node and type the following: print('hello modeler!')
      Not too exciting, but enough for now.
    • Now right click on this node and select preview. This will show a table of your input data, but what we care about is the Console Output in the R Transform node. It should look like this: test
If you produced the same output as shown in the screenshot then you have successfully installed R Essentials for Modeler!

Install Guide for SPSS Statistics v24:
  1. Install the correct version of R. For Statistics version 24 you will need to have R version 3.2.x installed on your machine. I downloaded this version here.
  2. Download and run R essentials from the Statistics R Essentials GitHub repository.
  3. When installing R Essentials, there are two file paths you will need to validate:
    • First, you need to indicate your R 3.2.x installation folder. This will look slightly different than the Modeler screenshot above but is the same step.
    • Next, you need to pick the installation folder for your Statistics version 24. I used the default install path so I did not have to change anything here. If you changed your install directory you will need to update this.
    • Next, you just need to confirm both directories you selected were correct and click Install.
  4. Now we have R installed and R Essentials installed. To do a quick test, let's open up Statistics 24
    • Open SPSS Statistics and create a new Syntax Editor by clicking File > New > Syntax
    • Let's type in some basic syntax for starting an R program and printing a statement
      BEGIN PROGRAM R print('Hello Statistics') END PROGRAM
    • Now highlight this code block or click the 'BEGIN PROGRAM' on the left pane of the Syntax editor and click the green 'Run Selection' button at the top of the screen. This will create a new Output window displaying your code and the R output: StatsTest
You now have R Essentials installed for version 24 of SPSS Statistics!

If using version 24 of SPSS Statistics or version 18 of Modeler - go to Extensions > Extension Hub to find & install extensions that will help make your work easier. If you are on an older version, visit the Predictive Analytics Gallery on GitHub to find extensions.

29 comments on"R + SPSS: Installing R Essentials from GitHub"

  1. Great summary, thanks Greg.

  2. Thanks, that’s really helpful.
    Can you please also do another walk through for installing R essential for Mac on Modeler.

  3. Thanks!

  4. Is it possible to have a installation guide for Mac?

  5. Thanks for the blog. However, I have installed R 3.3 on my 64-bit Windows machine with SPSS statistics 23 installed. When I try to install the appropriate R Essentials it asks ‘where is R installed’. When I point it to the direction of R 3.3 I get an error stating that R 3.1 is not installed (which is true, but I would expect the two to work). Should I downgrade R to 3.1, or can R Essentials be updated?

  6. Hello.
    I finally was able to install everything but I cannot run it. I get an error when I tried to do FA with dichotomous items. Any Idea why?
    I have SPSS 24 and R 3.2 version

    Thank you.

  7. Hello, I tried to install R-Essentials for SPSS Modeller 18 64bit on Windows 7 Professional, but everytime I try I get an error message that my R version ist not supported.
    I have R 3.2.0 installed both 32bit and 64bit. The problems occurs as well with R 3.2.1, R 3.2.2, R 3.2.3, R3.2.4 and R3.2.5 .
    Confunsingly install log tells me, that checking R-version has been succesfull and installation has been been aborted by user (because the error message would not let me continue).
    Can somebody help me with that problem?
    Kind Regards

    • Sam problem with me. Can anyone suggest on this error?

    • Same problem with me. Can anyone please advise on this? I tried several times with different recommended versions but still facing problem.

  8. Hello,

    I managed to get R essentials installed for Mac. Process is basically the same apart from a couple things. FYI I did this on OSX El Capitan:

    1. You must install R-3.2.2, I couldn’t get that to happen through ports or homebrew. Instead, I went here: and installed the 3.2.2 pkg for mac.

    2. Once installed the path is: /usr/local/bin

    3. To enter the path you have to hit cmd + shift + g in the selection window and directly type in the path.

    4. The install directory for pasw.rstats for me was: /Application/IBM/SPSS/Modeler/18/

    • Mike, cannot get the R essentials installed for my Mac (El Capitan, latest version; SPSS stat 24 with upgrades, R 3.2.2), hangs when trying to unzip R packages (at 27%). I do not quite get the points 2 and 3 in your comment, the R-install directory for me is the default /Library/Frameworks/R.framework/Resources. Any help would be appreciated, thanks

  9. Hey, After installation I am getting errors in starting up my modeler stating “modeler server stopped” (I am not using modeler server, using modeler client on local Windows machine). Also, if I try to run a simple R code using R Transform, the same error appears. If I try to load a cache the same error occurs. Everytime stream gets halted. Please guide.

  10. Also, it will be great if you could suggest how to uninstall the R Essentials package that was loaded.

  11. florencelui January 10, 2017

    Are there R essentials for Mac downloads on Github for SPSS v. 20 (I can only see downloads for versions 21 and up)? Thanks for your help!

  12. Not directly related. But I have SPSS V22 installed all the respective components: R, R essentials to run PSM. However, once I execute the addition PSM I get an error where it says it could not install optmach. I have tried to install the optmatch package but I get an error where R cannot create the library. Since the upgrade V24 is going to be ready soon, I thought about waiting and removing V22 and R related software, but actually wonder if I would still have the same problem.
    I sure would like to know if anyone experienced my problem and a possible solution. Tried to create the library and still had the problem. I may add that I am new to R so still learning the its commands.

  13. Manged to install all V22 related software. Will try V24 at some point later.

    • Hey, Ornelas! I am having the same issue for SPSS 22 while installing OPTMATCH. Please guide me, how did you manage to install it successfully? Thanks in advance.

  14. Saleem Shaikh June 15, 2017

    Can Modeler 18 work with R 3.4 if yes how do I make the R essentials package work for it. Or is there a separate R essentials package available for R 3.4 and SPSS modeler 18 version.

  15. Ted Fischer June 20, 2017

    Modeler 18 only works with R 3.2. However, Modeler 18.1 just released can run with any verison of R but only R 3.3 is officially tested and supported.

  16. I have Modeler v18.1 installed, along with R v3.4.1 on Mac. I tried installing “Essentials for R” several times but the R nodes do not show up in Modeler. I tried uninstalling R, and installing older versions of R as well, but no luck. Any help would be appreciated.

  17. Melissa Restrepo December 14, 2017

    For Mac users, these are the folder paths for step 3:

    -R Installation Folder Path:
    Macintosh HD/Library/Frameworks/R.framework/Versions/3.2/Resources

    -SPSS Installation Folder Path:

  18. January 24, 2018

    Statistics V24 + R 3.2.5 on Linux:

    The installation process freezes at 84% — “Execute Script/Batch file: Install R packages”.

    Any leads on what might be the cause? In the past IBM’s installers for Linux had improper JRE memory settings that led to similar problems. Unfortunately, I lost track of my notes and would like to avoid a lengthy troubleshooting process.

    • January 24, 2018

      Never mind. That was exactly it …. a little more heap size and it runs through. I suspect it is machine/architecture dependent.

  19. I am trying to install R-essentials for SPSS Stat V24 on a Windows 10 computer. I downloaded R 3.2.0 and R-essentials and the installation process works perfectly. However, when I try to run the R test program:

    print(‘Hello Statistics’)

    I get the following error message:

    >Error # 6887. Command name: BEGIN PROGRAM
    >External program failed during initialization.
    >Execution of this command stops.
    The spss package could not be loaded. Please make sure that Essentials for R has been successfully installed.

    Any thoughts on how I can work this up?

  20. Thank you for the great explanation. I ran into this issue. After downloading the 64-bit version of R 3.2.0 and downloading R-essentials for Windows with the correct file paths. I tried running the program and got:
    Error 6887:
    External program failed during intialization.
    Execution of this command stops
    The SPSS package could not be loaded. Please make sure Essentials for R has been successfully installed.

    Does anyone know how I should go about fixing this?

Join The Discussion

Your email address will not be published. Required fields are marked *