Hi all,
I had an issue running R code through PROC IML that you all previously helped solve (see here), however the fix that worked for me is not working for some of my co-workers who are also needing to run R code through PROC IML. They are also trying to run R 4.4.0 through PC SAS 9.4 (TS1M7) via the PROC IML functionality and they are getting different error messages:
Their errors above are from running the example R/IML code provided by SAS here, namely:
proc iml;
call ExportDataSetToR("Sashelp.Class", "df" );
submit / R;
names(df)
endsubmit;
Anyone have ideas about this issue?
Maybe this hot-fix: https://support.sas.com/kb/70/253.html ?
I also thought it might be that, even though the error messages don't quite match (e.g. my coworkers aren't getting the final ERROR: The final R statement is incomplete. piece)
Anyway, we tried it but Deployment Manager said that hot fix was not applicable to their installations. Thanks for the suggestion!
This is most likely an installation issue with R and/or SAS. To confirm that is what is going on in your case, you could contact Technical Support and have them verify that it is not something else.
Thanks, Rob. I'll talk with my coworkers and get one of them to contact Technical Support.
I am getting this same error with SAS 9.4 (TS1M8) on all R versions 4.2.0 or later. I ended up reverting to R 4.1.3 to fix the problem.
Maybe the R_HOME is not set right? Try something similar to this:
options set=R_HOME="X:\R\R-4.3.1\"; /* set R_HOME */
data _null_; /* check the R_HOME value */
x=sysget('R_HOME');
put x=;
run;
/* run test */
proc iml;
call ExportDataSetToR("Sashelp.Class", "df" );
submit / R;
names(df)
endsubmit;
quit;
Bart
Yes, the error is occurring even with R_HOME set correctly. I am getting a slightly different error than the one described for this hot fix, and if the hot fix is for changes introduced in R 4.3.0, what might explain why I am getting the same error all the way back to 4.2.0 on TS1M8?
@kdett - " a slightly different error" - could you share?
"You shall pass" and "You shall not pass" are also only slightly different 😉
Bart
Sorry, it is a little hard to follow the thread.
What is the exact error message you are receiving at this point?
Does the version of R run outside of SAS without any issues?
As I mentioned in the previous thread, this is likely related to an installation issue with R, but it is hard to say for sure
I should also mention that there is a security vulnerability in all of the versions of R prior to 4.4.X so you might not want to run an earlier version anyway. My suggestion would be to add the hotfix that I mentioned, remove all the old versions with the vulnerability and update to 4.4 and start from there. This might resolve issue, but at the very least, it will eliminate several possible causes.
The error message I'm receiving is the one in the screenshot at the top of this thread that the original poster claimed the hot fix was unable to resolve for his co-workers. I'm using R 4.4.x without issue otherwise, and will attempt the suggested hotfix as soon as I have time to work with IT.
I believe this is a known problem and there is a hotfix that fixes the issue.
@SAS_Rob Can you post a link to the appropriate hotfix so that this thread contains the information needed to resolve this issue?
Try installing the hotfix here and see if that resolves the issue.
Looks like it's exactly the one I proposed in August. 🙂
Just an update, I was able to install the suggested hotfix and it did not solve the error with R 4.4. I am still receiving the same message at the top of this thread. R 4.4 is working fine otherwise.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.