Statistical programming, matrix languages, and more

Frustrated trying to get the connect to R

Accepted Solution Solved
Reply
Contributor
Posts: 25
Accepted Solution

Frustrated trying to get the connect to R

I'm trying to call R functions from within IML. To make sure SAS was set up properly, I ran PROC OPTIONS option=RLANG; The result I got indicated that the NORLANG option had been initiated. So, I tried looking for the SASV9.fcg file. But I wasn't able to locate a file with that exact name, even when searching in the SASHome directory and subdirectories. Does anyone have a suggestion on what to do? Thanks! Andrew
Andrew A. Kramer, PhD
President
Prescient Healthcare Consulting

Accepted Solutions
Solution
‎02-28-2017 12:23 PM
SAS Super FREQ
Posts: 3,415

Re: Frustrated trying to get the connect to R

The documentation for calling R from SAS/IML 

 

As RW9 says, it would be helpful to know how you are running SAS (EG? Display Manager?). Also, make sure that R is installed on the same machine as SAS.

 

If you are using PC SAS, you can find directions for modifying the sasv9.cfg file at the end of this article.

View solution in original post


All Replies
Esteemed Advisor
Esteemed Advisor
Posts: 7,232

Re: Frustrated trying to get the connect to R

Well, you should be looking for SASV9.cfg - as in config.  However, you don't say what software you are using, where it is installed etc. 

Solution
‎02-28-2017 12:23 PM
SAS Super FREQ
Posts: 3,415

Re: Frustrated trying to get the connect to R

The documentation for calling R from SAS/IML 

 

As RW9 says, it would be helpful to know how you are running SAS (EG? Display Manager?). Also, make sure that R is installed on the same machine as SAS.

 

If you are using PC SAS, you can find directions for modifying the sasv9.cfg file at the end of this article.

Contributor
Posts: 25

Re: Frustrated trying to get the connect to R

Sorry, I meant SASV9.cfg There are scads of files with those names, so I chose the one in the \Programs\SASHome\SASFoundation directory. I added the -RLANG statement to it. Here's the output I get when I run PROC OPTIONS option=RLANG; NOTE: Library PHASE2 does not exist. NOTE: AUTOEXEC processing completed. 1 proc options option=RLANG; run; SAS (r) Proprietary Software Release 9.4 TS1M2 NORLANG Disables SAS from executing R language statements. NOTE: PROCEDURE OPTIONS used (Total process time): real time 0.00 seconds cpu time 0.00 seconds I must still be doing something incorrectly, but what?
Andrew A. Kramer, PhD
President
Prescient Healthcare Consulting
Contributor
Posts: 25

Re: Frustrated trying to get the connect to R

I found the correct cfg file and added the -RLANG option. So I'm good to go. Thanks!!!
Andrew A. Kramer, PhD
President
Prescient Healthcare Consulting
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 195 views
  • 0 likes
  • 3 in conversation