BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Albert0
Quartz | Level 8

Hi SAS Users,

 

I am new to SAS VIYA and heard about integration of JAVA, R, Python etc.. to SAS. I would like to ask about outputs of R program going directly to SAS CASLib. I wanted to know what are the requirements if I have run an R program in a different server but I wanted the output of the R program to be accessed directly in VIYA without exporting and importing it to the VIYA server?

 

Can anyone make a suggestion? 

 

Thanks.

 

Albert0

1 ACCEPTED SOLUTION

Accepted Solutions
AnandVyas
Ammonite | Level 13

Hi @Albert0 

 

I think you can try SWAT which is a client package that allows you to make connection to CAS server and perform CAS actions. You can find more details about it here.

 

https://github.com/sassoftware/R-swat

View solution in original post

5 REPLIES 5
AnandVyas
Ammonite | Level 13

Hi @Albert0 

 

I think you can try SWAT which is a client package that allows you to make connection to CAS server and perform CAS actions. You can find more details about it here.

 

https://github.com/sassoftware/R-swat

Albert0
Quartz | Level 8

Hi @AnandVyas ,

 

Thank you for your prompt reply. I understand from reading the documentation that this will allow me to create an R program and run it in the VIYA Environment to produce result. What if I wanted to run my R program inside R Environment? Do I still need to install the client package in order for the R program to produce the output into VIYA Environment?

 

Thanks.

 

-Albert0

AnandVyas
Ammonite | Level 13
I think in order to process output in CAS (In-memory engine for Viya) you will have to assign a caslib which should be locally available data-source or DBMS. If the R server is separate box with no access to Viya I don't think you can load it into CAS with exporting it as data has to be loaded in memory for the processing.
Albert0
Quartz | Level 8

Hi @AnandVyas ,

 

Thank you for your fast reply.

I think I understand now.

 

Thanks.

 

 

joeFurbee
Community Manager

Hi @Albert0,

You can find more resources on SAS and R integration on developer.sas.com/guides/r.There you'll find links to various integration points, related blog posts, and sample code.


Join us for SAS Community Trivia

SAS Bowl LXI - SAS at 50 and SAS Innovate Recap
Wednesday, May 27, 2026 at 10 am ET.