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.
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.
That's helpful, thank you.
Check your option RLang:
proc options option=RLang;
run;
And Better post it at IML forum . @Rick_SAS is there .
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.)
@Rick_SASPlease find the macro source code, my program, and a sample dataset attached.
Thank you.
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.
Okay, I'll try that. Thanks.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.