Skip to content
Prev 371611 / 398506 Next

Converting SAS Code

Hi,

I would echo Bert's comments below.

The last thing that you want to try to do is to convert SAS code to R code on a "line for line" basis. The programming paradigm of R, which is built upon vectorized operations, takes a "whole object" approach for efficiency. SAS does not, since it is generally based upon 1970's era, main frame style, programming techniques using macros, etc.

If this is not a one off and something that you might find yourself doing with some frequency, you might consider investing in Bob Muenchen's book, R for SAS and SPSS Users:

  https://www.amazon.com/gp/product/1461406846/ <https://www.amazon.com/gp/product/1461406846/>

While it is now a few years old, it is still relevant in terms of pointing you in the direction of basic and conceptual linkages between the languages.

Regards,

Marc Schwartz