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.
... View more