BookmarkSubscribeRSS Feed

Unleash the Power of Coding with Python or R in SAS Studio

Started 2 weeks ago by
Modified 2 weeks ago by
Views 177

Imagine this – you’re in the thick of your semester projects, and you discover SAS Viya for Learners 4, a cloud-based analytics software provided free to students and educators who register with an academic email address. Oh, the realm of possibilities at your fingertips! Your excitement cannot be contained. You have to reach out to your buddy, who will certainly be as excited as you...


Picture1.jpg


Pinch yourself – it’s not a dream!


In SAS Studio, tapping into open-source coding capabilities has never been easier. Whether you’re a Python enthusiast or a dedicated R coder, SAS Viya for Learners 4 has you covered!

 

How to Access These Features:

1.  Pure Python Script: If your task can be accomplished entirely with Python, no need to mix SAS and Python syntax! Keep your code clean and straightforward by using a Python script. 

  • From the Editor Window, simply click the + icon in the Editor window to start a new Python program.Picture2.jpg
  • Alternatively, click the New button in the top pane and select Python program to create a fresh Python script.Picture3.jpg
  • Through either method, your script is fully equipped to handle your Python code seamlessly. This method also opens the door to uploading your .PY scripts to SAS Studio so you can continue any previous analyses smoothly!

 

2.  Harnessing Python with PROC Python: Expand your capabilities by incorporating Python code directly into your SAS workflows using PROC Python. This powerful procedure allows you to run Python scripts within your SAS environment, combining the best of both worlds for a truly integrated analytics experience. If you want to learn more about this, check out @NicolasRobert's post Using PROC PYTHON to augment your SAS programs.

 

3.  Calling All R Coders: Exciting news for R users! With the latest updates in Viya for Learners 4, you can now execute R code within PROC IML. This integration provides a robust platform for your statistical and mathematical computations, leveraging the full power of R within SAS.

 

TL;DR Version:

There are three ways to utilize Python and R from within SAS Studio on SAS Viya for Learners 4!

  1. Python Program: Start a new Python script via the + in the Editor window or the New button in the top pane.
  2. PROC Python: Utilize Python code seamlessly within your SAS workflows using the PROC Python procedure.
  3. PROC IML for R: Call your R code from within PROC IML to harness the advanced statistical capabilities of R in your SAS environment.

 

Why Wait? Get Started Today! Explore the enhanced capabilities of Viya for Learners 4 and elevate your data analysis with seamless open-source integrations. Whether you’re scripting in Python or coding in R, SAS Studio makes it easy to bring your projects to life.

Version history
Last update:
2 weeks ago
Updated by:
Contributors

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags