BookmarkSubscribeRSS Feed
ABurn
Fluorite | Level 6

Hi,

 

I am trying to source an R script which reads and formats my data. 

 

I can do this using the following code:

 

proc options option=RLANG;
run;
proc iml;
    submit / R OK=isOK;
        source('Data_Preparation.R')
    endsubmit;
quit;

 

It seems to read in everything OK, but the last bit of the Data_Preparation.R file is to write the final dataset which I then read into SAS, but nothing gets written.

 

The code runs with no errors, but has the warning: 

 

"An exception of type c0000005 occurred at address 6c910ef2 while processing the submitted R statements. This address is at offset 10ef2 into module "H:\R\R-3.6.0\bin\i386\R.dll"

 

I don't understand what this warning is or if it's relevant, but it's the only thing I could find that didn't look normal.

 

I am using SAS v9.4, and I have used RLANG successfully before, so I'm not sure what's going on. I tried both with and without the 'OK = isOK' bit. I just found that on another forum and tried it, but it did nothing that I can tell.

 

Can anyone help?

1 REPLY 1
Rick_SAS
SAS Super FREQ

The code did not run without error. The phrase "An exception ... occurred" means that something bad happened (maybe a crash) in R. 

If the data set doesn't get written, then the crash might be occurring before that data are written.

 

Without knowing the contents of the script (packages? function calls?), it is impossible to know what is failing. If the script is very large, your best bet is to use a binary search to help locate the problem. First submit the first half of the program. If it works, the problem is in the second half. Then submit half of the program that has the error. Is the problem in the first half of the second half? And so forth. This might require that you be creative to whittle down the program until you isolate the line that fails.

 

It looks like you are running R 3.6.0 on 32-bit windows  I believe that R made changes to the way it saves certain binary files in that version, but I might be misremembering the facts. At any rate, I suggest you create a simple example that will isolate the problem. If you can produce a simple program that runs in RGui but fails when it runs in SAS, then submit that program (and any data) to SAS Technical Support.

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 1 reply
  • 632 views
  • 0 likes
  • 2 in conversation