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"

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

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