Statistical programming, matrix languages, and more

R interface

Reply
New Contributor
Posts: 3

R interface

I just got R installed and tried to call it from SAS/IML Studio. After setting R_HOME I got the error message: IML Studio was unable to load R. (1, 1).
What could be the reason for that?
SAS Super FREQ
Posts: 3,630

Re: R interface

I assume that you are able to run R from Start-->All Programs-->R?

If so, I think you should contact SAS Technical Support and send them the following information:
1) The version of R you are using
2) The version of Windows you are using
3) Are you using a 32-bit or 64-bit version of Windows?
4) Are you using a 32-bit or 64-bit version of R?
Contributor
Posts: 34

Re: R interface

Hi
Same prob. The trick is you need the installpath not the location of R.exe ie
C:\Program Files\R\R-2.10.1 (I used the registry method).
R
SAS Super FREQ
Posts: 3,630

Re: R interface

Yes, R_HOME should point to the installation directory, not to the `bin` subdirectory.

The main purpose of R_HOME is to enable SAS/IML Studio to work with a particular version of R when you have multiple versions of R installed.

When you install R from Windows binaries
(for example, by launching `R-2.10.1-win32.exe`)
it automatically sets R_HOME (or maybe there is a checkbox in the installer), so most folks don't need to fiddle with R_HOME at all.

I'm curious. Was R_HOME not set properly after you installed R?
Did you install from Windows binaries or did you build R from source code?
Contributor
Posts: 34

Re: R interface

R_HOME or the registry entry wasn't set when I installed 2.10.1.
Looking at the windows FAQ for R it looks like its supposed to set up the appropriate registry entry by default. However if you run Rsetreg.exe in the bin dir it sets the registry items for you.
R
New Contributor
Posts: 3

Re: R interface

Thanks for the tips!
The idea was to use the prerelease 64-bit R Version 2.11.0 on our new 64-bit windows server to exploit the 64-bit architecture.
Now it works, and this is what I learned from SAS support:
(a) There is no true 64-bit version of SAS/IML Studio.
(b) The edition of SAS/IML Studio labeled for 64-bit Windows is really a 32-bit program that runs on 64-bit Windows.
(c) SAS/IML Studio 3.2 requires a 32-bit version of R.
(d) There is no official distribution of R for 64-bit Windows from the Comprehensive R Archive Network (CRAN). There is a version of R for 64-bit Windows available from REvolution Computing, but it will not work with IML Studio because IML Studio 3.2 requires a 32-bit version of R.
(e) We do have plans to produce a true 64-bit version of SAS/IML Studio in the future. However, there is no schedule yet for when that would be available. At least a couple of years.
(f) If SAS/IML Studio 3.2 is installed on a 64-bit Windows system and SAS 9.2 is also installed in 64-bit form, IML Studio can connect to the 64-bit SAS.

So we tried it with a 32-bit version after the confirmation:
"I can confirm that SAS/IML Studio work fine with R 2.10.1."
After setting R_HOME as proposed, we got it.
One last finfding: The error message mentioned above is the same, either using a 64-bit version of R, or having the environment variable not set.
N/A
Posts: 0

Re: R interface

Hello,

I am stuck with the very same problem. In the beginning I've been able to install SAS/IML Studio 3.2, and manually set R_HOME in system environment variables. It worked.

But now I need another install, and the same approach fails miserably. R itself does not seem to leave any traces in the registry (I've checked that option during the installation, as well as tried running the RSetReg.exe file). Nada.

Version 3.3 of the Studio hasn't helped either. It would have been much easier to appoint the R directory from within SAS/IML Studio itself. Or at least for the error to be more verbose, as there is no clue to a solution.
SAS Super FREQ
Posts: 3,630

Re: R interface

What version of R are you using?
Contributor
Posts: 34

Re: R interface

Does IML studio 3.3 work with R 2.12.1 ?

R
SAS Employee
Posts: 2

Re: R interface

SAS/IML Studio 3.3 and PROC IML 9.22 do not support R 2.12.0 or later. Support for these newer versions of R has been added to SAS/IML Studio 3.4 and PROC IML 9.3, which will be released when SAS 9.3 ships later this year.
Contributor
Posts: 34

Re: R interface

Thanks for this info. Also how does one update their installation of IML to ver 9.22. I understand it came out later than the rest of 9.22 which I have already.
Thanks
S
SAS Super FREQ
Posts: 3,630

Re: R interface

That was recently discussed on the following thread:
http://support.sas.com/forums/thread.jspa?threadID=12881&tstart=0
Ask a Question
Discussion stats
  • 11 replies
  • 1026 views
  • 0 likes
  • 5 in conversation