HI.
What is the popular way to convert SAS code into R.
We are thinking to use PMML.Is it a good idea or what other ways we have?
Thank You in advance
As @RW9 said,
There is no change my code from one language to another button.
As @Reeza shared,
Code conversion is not a 1:1 process and requires a programmer who knows both systems. Don't underestimate the amount of work required.
The short answer is, "No, there is no simple way to convert SAS processes to R processes even when they are similar in nature".
Having said that, are you trying to translate training code for building models or are you trying to translate data step code for scoring/manipulating data? Presumably you are looking to R for analytics rather than data preparation. It is very unlikely that you would be able to generate identical results in any modeling situation involving optimization since the optimization algorithms in R and SAS would almost certainly generate slightly different solutions in most cases.
SAS Enterprise Miner can facilitate using R code through the Open Source Integration node, but there is no reason for SAS to export R code. SAS Enterprise Miner generates score code in SAS and it can also generate score code in Java, C, and PMML for certain processes. This code is generated by the modeling nodes rather than being converted.
Hope this helps!
Doug
You analyze the code from one programming language, and then implement the logic in the new language? There is no change my code from one language to another button. As you will have been programming to SDLC the process should be quite simple as the Functional Design Specs, Test Cases, etc. will all be transferable, only the actual syntax coding will be different. Of course if you haven't done that then your back to stage 1.
PMML only works if you have SAS EM and models. No reports built in sas?
Code conversion is not a 1:1 process and requires a programmer who knows both systems. Don't underestimate the amount of work required.
You may want to check out this free class that SAS offers "SAS Programming for R Users".
I found it very useful to see how R programming translate into SAS code.
Catch the SAS Global Forum keynotes, announcements, and tech content!
sasglobalforum.com | #SASGF
As @RW9 said,
There is no change my code from one language to another button.
As @Reeza shared,
Code conversion is not a 1:1 process and requires a programmer who knows both systems. Don't underestimate the amount of work required.
The short answer is, "No, there is no simple way to convert SAS processes to R processes even when they are similar in nature".
Having said that, are you trying to translate training code for building models or are you trying to translate data step code for scoring/manipulating data? Presumably you are looking to R for analytics rather than data preparation. It is very unlikely that you would be able to generate identical results in any modeling situation involving optimization since the optimization algorithms in R and SAS would almost certainly generate slightly different solutions in most cases.
SAS Enterprise Miner can facilitate using R code through the Open Source Integration node, but there is no reason for SAS to export R code. SAS Enterprise Miner generates score code in SAS and it can also generate score code in Java, C, and PMML for certain processes. This code is generated by the modeling nodes rather than being converted.
Hope this helps!
Doug
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.