BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
UrvishShah
Fluorite | Level 6

Hi All,

 

I am trying to call R language statement by using "PROC IML" in Base SAS 9.4...

 

I have SAS IML Studio 14.1, SAS/IML 14.1 and R 3.2.2/R 3.2.3 and also set the following in configration file of SAS...

 

-RLANG
-SET R_HOME "<C:\Program Files\R\R-3.2.2>"

 

Still I am getting following error in Base SAS...

 

ERROR: SAS could not initialize the R language interface.
ERROR: An installed version of R could not be found.

 

When I tried to call R language statement in SAS IML Studio, it works fine...

 

I need to call R from Base SAS Proc IML not from SAS IML Studio...

 

Thanks in Advance!!!!!

 

-Urvish 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

You almost never have to define R_HOME if you install R in a standard place. In fact, I think the SAS/IML documentation for calling R. doesn't even mention it.

 

Remove the refernce to R_HOME.  If you need it, I believe that the correct syntax does not contain the angle brackets; just use  "C:\Program Files\R\R-3.2.2"

View solution in original post

3 REPLIES 3
Rick_SAS
SAS Super FREQ

You almost never have to define R_HOME if you install R in a standard place. In fact, I think the SAS/IML documentation for calling R. doesn't even mention it.

 

Remove the refernce to R_HOME.  If you need it, I believe that the correct syntax does not contain the angle brackets; just use  "C:\Program Files\R\R-3.2.2"

UrvishShah
Fluorite | Level 6

Hi Rick,

 

Thanks for the quick response...I just removed it and it is working fine now...Do you think we can use SAS Language within the R Interface...I whould like to use SAS Language within SUBMIT and ENDSUBMIT block while using R language...

 

Thanks again!!!

 

Rick_SAS
SAS Super FREQ

Yes, you can call SAS procedures and R functions in the same program. That is Advantage #4 on the list of "Twelve advantages to calling R from the SAS/IML language"

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 3 replies
  • 3102 views
  • 0 likes
  • 2 in conversation