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

Hello. I am using a SAS macro to call functions from a package in the R environment. This macro is working fine on my university computer, but is not working on my personal computer, which has the same versions of SAS and R installed.

 

The problem arises when the SAS macro gets to the point where it calls R to install the R package needed to run the script. R opens but the packages are unable to be installed and the macro aborts. 

 

I believe that the issue is from the SAS side, not the R side. Again, this program is working perfectly on a different computer at school, so it isn't the syntax.

 

Can anyone help me understand why this is not working on my home computer and potential solutions?

Thank you for your time.

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

I don't know why the macro is unable to install the R package. The macro performs lots of file manipulation (eg, creating folders on your Windows machine). I suggest you install the package manually. Since packages only need to be installed once, the macro should skip the installation if it sees that twang is already installed.

View solution in original post

8 REPLIES 8
Cynthia_sas
SAS Super FREQ
Hi:
I would recommend comparing what is installed on the computer where it works (PROC IML? Enterprise Miner?) versus what SAS components are installed on the computer where it doesn't work. The chances are good that the computer where it works has something installed that the personal computer does not have.
Cynthia
eabc0351
Quartz | Level 8

That's helpful, thank you.

Ksharp
Super User

Check your option RLang:

 

proc options option=RLang;

run;

 

And Better post it at IML forum . @Rick_SAS  is there .

eabc0351
Quartz | Level 8

@Ksharp @Rick_SAS  I checked Rlang and here is what appeared in the log file:


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

 

Rick_SAS
SAS Super FREQ

Post the program you are using and provide a link to the macro source code. (I assume you downloaded it from somewhere, but if you or your professor wrote the macro, please post the source code.)

eabc0351
Quartz | Level 8

@Rick_SASPlease find the macro source code, my program, and a sample dataset attached. 

Thank you.

Rick_SAS
SAS Super FREQ

I don't know why the macro is unable to install the R package. The macro performs lots of file manipulation (eg, creating folders on your Windows machine). I suggest you install the package manually. Since packages only need to be installed once, the macro should skip the installation if it sees that twang is already installed.

eabc0351
Quartz | Level 8

Okay, I'll try that. Thanks.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 1317 views
  • 0 likes
  • 4 in conversation