12-08-2014 12:49 PM
I have a very large file that does not fit into an excel workbook sheet - so I hope to continue processing my STAT analysis with SAS . My problem is how to convert the *.Rdata file to a *.sas7bdat file . I suppose I could first save the file from R as a plain text file (*.CSV) , but I'd like to know if there is something else I can try first to export the file from R into SAS. I have a SAS 9.4 license and am working on windows 64 bit machine. Unfortunately (at this time) I do not have the IML product licensed.
RIck did post something related in his his post from 2.5 years ago " Re: Appending data from R to SAS Apr 9, 2012 8:49 PM" , but surely other options are available with the latest releases?
I also want to shout out a THANK YOU to Matthew Cohen NESUG 2012 paper "SAS® and R Working Together". Surely the new FREE enticement SAS granted to University students last spring will inspire more R users to give SAS a try. I thought I would find more questions out there . Actually - its not ?s that I am searching for.... just answers!
Note: I do have SAS/STAT -- so maybe STAT studio can help out? Again, I am aware that both SAS Enterprise Miner and SAS/IML handle R formatted data, but I do not have those packages (yet).
We did recently buy The PC ACCESS Utility - and it is helpful with the many *.xlsx conversions I do -- but I don't find any mention of R type of PC files specified in the ACCESS documentation.
12-08-2014 01:21 PM
It sounds like your questions is really "Does SAS provide a utility in Sase SAS for converting a RDATA file to a SAS data set." I assume you are looking for something like PROC IMPORT. As far as I know, the answer is "No, Base SAS doesn't provide a utility like that."
There are some third-party macros that convert data to/from SAS and R. As far as I know, they all use R's write.csv function to write a CSV file and then read that into SAS by using PROC IMPORT or something equivalent. You can read about the various macros in this post:
You can try Xin Wei's %PROC_R macro if you don't want to run the conversion yourself.
Incidentally, you mention SAS Stat Studio. That is the old name of SAS/IML Studio. Since you do not have an IML license, that option won't help you.