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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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