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

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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