Hello,
I am familiar with coding in SAS on Demand for Academics but am not familiar with Rstudio. I eventually want to learn how to use both programs, but for now I want to show people how to look at data with the program that they are most familiar with. Is there a way to easily convert SAS code I have written (or simply run SAS code) in the Rstudio environment?
The answer depends on what version of SAS you are running and what you are trying to do. The SAS On Demand runs SAS 9.4. The newer SAS platform is SAS Viya. One of the advantages of SAS Viya is that you can call SAS functionality (called "actions") from open source languages such as python, R, lua, etc. This enables you to integrate SAS calls into a program that is running in some other language.
To make the connections between open source and SAS, you need to download and install a SWAT package.
For an example that uses R and RStudio, see the blog post by @joeFurbee : "Using RStudio with SAS Viya."
I hardly know RStudio, but i am sure that you can't connect it to a sas environment, like Viya or SAS BI, so no running sas in RStudio is most likely not possible.
The answer depends on what version of SAS you are running and what you are trying to do. The SAS On Demand runs SAS 9.4. The newer SAS platform is SAS Viya. One of the advantages of SAS Viya is that you can call SAS functionality (called "actions") from open source languages such as python, R, lua, etc. This enables you to integrate SAS calls into a program that is running in some other language.
To make the connections between open source and SAS, you need to download and install a SWAT package.
For an example that uses R and RStudio, see the blog post by @joeFurbee : "Using RStudio with SAS Viya."
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.