BookmarkSubscribeRSS Feed
ArthurBaines
Calcite | Level 5

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:

ArthurBaines_1-1724190831674.png

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?

15 REPLIES 15
yabwon
Onyx | Level 15

Maybe this hot-fix: https://support.sas.com/kb/70/253.html ?

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



ArthurBaines
Calcite | Level 5

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!

SAS_Rob
SAS Employee

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.

ArthurBaines
Calcite | Level 5

Thanks, Rob. I'll talk with my coworkers and get one of them to contact Technical Support.

kdett
Calcite | Level 5

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.

yabwon
Onyx | Level 15

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

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



kdett
Calcite | Level 5

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?

yabwon
Onyx | Level 15

@kdett  - " a slightly different error" - could you share?  

"You shall pass"  and "You shall not pass" are also only slightly different 😉 

 

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



SAS_Rob
SAS Employee

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.

kdett
Calcite | Level 5

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.

Rick_SAS
SAS Super FREQ

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?

yabwon
Onyx | Level 15

Looks like it's exactly the one I proposed in August.  🙂

 

yabwon_0-1731941197455.png

 

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



kdett
Calcite | Level 5

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.

SAS Innovate 2025: Register Now

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!

Multiple Linear Regression in SAS

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.

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