Topic
  • 5 replies
  • Latest Post - ‏2013-11-11T21:41:14Z by JonPeck
Biltroller
Biltroller
2 Posts

Pinned topic SPSS 21 and R Essentials not working

‏2013-09-06T09:26:25Z |

Dear all,

seems an often named problem, but it is very complicated to get it running:

I have SPSS 21 64bit installed on WIN 7 Enterprise 64bit SP 1, also R 2.14.0

I installed R Essentials for 64bit as administrator, it seemed that it installed everything needed (given no error message)

Then startet SPSS 21 again (as administrator or not, did not make a difference)

Neither the additional menu items came (I need quantile regression especially) nor could I install extensions or use RASCH etc.

Always the message:" you have to install R Essentials..."

But I did install or at least I think so given no error messages..

Is there an easier way for example via "File -> Repository"? But then I need access to that and do not know how.

Any help is greately welcome!

 

  • JonPeck
    JonPeck
    91 Posts

    Re: SPSS 21 and R Essentials not working

    ‏2013-09-06T12:54:46Z  

    Sorry that you are having trouble.  Here are some things to check.

    First, can you start Rgui from the Start menu?  That should show that R is actually installed and the version and whether it is 32 or 64 bit.

    Next, in the syntax window enter and run this code.

    begin program r.
    print(sessionInfo())
    end program.

    If the R plugin is actually installed, you should see something like this:

    R version 2.14.2 (2012-02-29)
    Platform: x86_64-pc-mingw32/x64 (64-bit)

    locale:
    [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
    [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
    [5] LC_TIME=English_United States.1252    

    at
    [1] stats     graphics  grDevices utils     datasets  methods   base     

    loaded via a namespace (and not attached):
    [1] tools_2.14.2
     

    Look in your Statistics installation directory.  You should see files named
    InvokeR.dll and InvokeX.dll

    Look also at the spssdxcfg.ini file in that directory.  It should look like this (ignore the Python references)

    SpssdxVersion=21.0.0.1
    SpssdxVersionMajor=21
    SpssdxVersionMinor=0
    SpssdxVersionPatch=0
    SpssdxFixPack=1

    [SUPPORTED_LANG]
    X=PYTHON;R
    [Python]
    HOME=C:\Python2764\
    LIB_NAME=InvokePython
    [R]
    HOME=C:\R2.14.2
    LIB_NAME=InvokeR

    In a syntax window run SHOW EXTPATHS.  That shows where Statistics is looking for  the files for extension commands and their dialogs.  Look in those locations to see what files are actually present.  For SPSSINC QUANTREG, e.g., you should see

    SPSSINC_QUANTREG.R and SPSSINC_QUANTREG.xml

     

    There should also be files for the dialog boxes, but let's deal with that later.

  • Biltroller
    Biltroller
    2 Posts

    Re: SPSS 21 and R Essentials not working

    ‏2013-09-11T12:50:41Z  
    • JonPeck
    • ‏2013-09-06T12:54:46Z

    Sorry that you are having trouble.  Here are some things to check.

    First, can you start Rgui from the Start menu?  That should show that R is actually installed and the version and whether it is 32 or 64 bit.

    Next, in the syntax window enter and run this code.

    begin program r.
    print(sessionInfo())
    end program.

    If the R plugin is actually installed, you should see something like this:

    R version 2.14.2 (2012-02-29)
    Platform: x86_64-pc-mingw32/x64 (64-bit)

    locale:
    [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
    [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
    [5] LC_TIME=English_United States.1252    

    at
    [1] stats     graphics  grDevices utils     datasets  methods   base     

    loaded via a namespace (and not attached):
    [1] tools_2.14.2
     

    Look in your Statistics installation directory.  You should see files named
    InvokeR.dll and InvokeX.dll

    Look also at the spssdxcfg.ini file in that directory.  It should look like this (ignore the Python references)

    SpssdxVersion=21.0.0.1
    SpssdxVersionMajor=21
    SpssdxVersionMinor=0
    SpssdxVersionPatch=0
    SpssdxFixPack=1

    [SUPPORTED_LANG]
    X=PYTHON;R
    [Python]
    HOME=C:\Python2764\
    LIB_NAME=InvokePython
    [R]
    HOME=C:\R2.14.2
    LIB_NAME=InvokeR

    In a syntax window run SHOW EXTPATHS.  That shows where Statistics is looking for  the files for extension commands and their dialogs.  Look in those locations to see what files are actually present.  For SPSSINC QUANTREG, e.g., you should see

    SPSSINC_QUANTREG.R and SPSSINC_QUANTREG.xml

     

    There should also be files for the dialog boxes, but let's deal with that later.

    Dear Jon,

     

    thank you very much for your answer which helped me to find my fault: I installed R 2.14.0 instead of R 2.14.2, what a difference a minor version makes... Now I works with SPSS. However, not a very user-friendly way to get it running, I must say. I did not plan to be an expert in computer technology as I started to work on research in social science...

     

    Thank you very much and best wishes

  • JonPeck
    JonPeck
    91 Posts

    Re: SPSS 21 and R Essentials not working

    ‏2013-09-11T12:58:39Z  

    Dear Jon,

     

    thank you very much for your answer which helped me to find my fault: I installed R 2.14.0 instead of R 2.14.2, what a difference a minor version makes... Now I works with SPSS. However, not a very user-friendly way to get it running, I must say. I did not plan to be an expert in computer technology as I started to work on research in social science...

     

    Thank you very much and best wishes

    We wish that there were fewer steps to getting this all set up, but because of the way R is licensed, we have to keep the R installation separate and place the R Essentials on a different site from most of the rest of our materials.  In Statistics 22, we have made the process of installing and working with programmability a bit easier, but there are limits to what we can do.

    Regards,

    Jon

  • JakeSTL
    JakeSTL
    1 Post

    Re: SPSS 21 and R Essentials not working

    ‏2013-11-11T18:58:27Z  

    Dear Jon,

    To follow up on your post with Bitroller, I wanted to ask how to deal with an "x11 display" error message in SPSS 21.

    Similarly, I have the SPSS 21.0 version installed, with R 2.14.2

    When I run the print command, I get the locale and attached base packages output, but also an error that reads:

    "in redirection (): Unable to open connection to x11 display"

    I was wondering if you have any suggestions on how to trouble shoot this.


    Thank you!

    Best,

    Jake

  • JonPeck
    JonPeck
    91 Posts

    Re: SPSS 21 and R Essentials not working

    ‏2013-11-11T21:41:14Z  
    • JakeSTL
    • ‏2013-11-11T18:58:27Z

    Dear Jon,

    To follow up on your post with Bitroller, I wanted to ask how to deal with an "x11 display" error message in SPSS 21.

    Similarly, I have the SPSS 21.0 version installed, with R 2.14.2

    When I run the print command, I get the locale and attached base packages output, but also an error that reads:

    "in redirection (): Unable to open connection to x11 display"

    I was wondering if you have any suggestions on how to trouble shoot this.


    Thank you!

    Best,

    Jake

    If you Google for this error message, which is coming from R and which seems to occur only on Unix/Linux systems, there are a lot of hits and various suggestions.  These are not specific to the SPSS integration.  One easy thing to try would be to put this at the top of your code.

    
    Sys.setenv("DISPLAY"=":0.0")
    

    You might also want to run

    capabilities()

    in the R code.  You shouldn't need an x11 server.

    If setting the DISPLAY variable works you might want to set that variable in your environment.