BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
James18
Obsidian | Level 7

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? 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

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."

 

View solution in original post

2 REPLIES 2
andreas_lds
Jade | Level 19

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.

Rick_SAS
SAS Super FREQ

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."

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 6826 views
  • 1 like
  • 3 in conversation