R-Guru Resource Hub |
This section discusses the similarities and differences between SAS and R. While most everything from SAS can be replicated in R, there is a steep learning curve since R concepts and process flow are more object oriented. R has meanings for special characters such as [], {} and () for example. In addition, most of R syntax consists of functions which are similar to SAS functions. So, knowing how to call SAS functions will help to understand, write and execute R functions.
R has SQL query type functions that enable filter records, subset variables and summary processing. Finally, R processes functions as a collection of independent sequence of steps. So, for example, variables can be created one-by-one with left variable assignments or combined when wrapped in a R function.
From SAS to R Results Workshop: Derivations, Queries and Joins (R-Guru Cheat Sheet)
From SAS to R Results Workshop: Summary Tables (R-Guru Cheat Sheet)