Watch this Ask the Expert session to learn how SAS® Viya® offers various ways to establish connectivity between R and SAS sessions.
You will learn how to:
The questions from the Q&A segment held at the end of the webinar are listed below and the slides from the webinar are attached.
Q&A
What is the minimum architecture should you have to execute? If you have R, then do you need SAS Viya?
You can do R and Base SAS integration with SASPy and SASR. If you have Viya, you can leverage the high performance in memory compute engines, the advanced machine learning, and additional algorithms that comes with it (using the R-SWAT library). The examples that we have shown today require Viya. If you have SAS 9, then you can replicate some of the examples leveraging SASPy and SAS R.
Are there any limitations to the amount of processing power available from SAS within a Shiny app?
There is no theoretical limitation how you deploy SAS Viya. It can be deployed within your preferred cloud (cloud cost is a practical limitation). So, it could be private cloud or SAS cloud. When it is deployed, the admins can decide how to scale it. You are only limited by the deployment configuration. Viya deployment can be scaled up and scaled back down as needed. So, it can always be redeployed based on your computational requirement.
What should I consider while downloading data from SAS Viya to R?
One key consideration is first of all, how large is your data? Because when you are downloading it, you don't want to hit the memory limit of your R instance. This can happen when you work with real world data, where you could have healthcare claims and EMR data. You don't want to download all the data into your R instance. Instead, you can leverage SWAT APIs to process the data within SAS Viya. Another key consideration is data security. Sometimes, you may not be allowed to download the raw data in your local instance. When your data is in Viya it is usually governed and protected by SAS credentials.
For SSL connect, which key do I need to use? Where can I find the key?
This key will be provided by your Viya admin. Contact your admin, they will be able to provide the key and the certificate that's required.
Do I always need to manually enter my SAS username and password?
No, there are multiple ways. This can be found in the SWAT documentation and SASPy documentation. One of my favorite ways is to use an AUTH info file, which securely stores your username and password, so you don't even have to enter it.
Can I upload csv files from R to SAS?
Yes, you can. I think I was too fast when I was trying to cover this, and I'll share my screen once again.
This is a simple example of how you upload your CSV file. One way is to upload that file API. This is pointing to this particular CSV (in local R instance) and pushing it to a library, then you can also use the read.csv () function.
Can you use desktop SAS at all with the integration to R or does it have to be online SAS?
I think what you mean is does it need to be SAS Viya or PC SAS, if I understood correctly. With PC SAS, you can use SASPy and SAS R. There are some ways to do that, but there are lots of limitations. On the other hand, SAS Viya, which is cloud native, provides more flexibility.
Recommended Resources
Creating R Shiny app with SAS Viya
SAS Viya Open-Source API references
Please see additional resources in the attached slide deck.
Want more tips? Be sure to subscribe to the Ask the Expert board to receive follow up Q&A, slides and recordings from other SAS Ask the Expert webinars.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Ready to level-up your skills? Choose your own adventure.
Your Home for Learning SAS
SAS Academic Software
SAS Learning Report Newsletter
SAS Tech Report Newsletter