BookmarkSubscribeRSS Feed
rogerjdeangelis
Barite | Level 11
Are these an unacceptable solutions to a SAS problem?

Seems to a lot of controversy about the relation between R and SAS. A user wanted to convert excel to a csv proc iml; submit / R; library(rio) convert('d:xls/xls_sample.xlsx','d:xls/xls_sample.csv') endsubmit; quit; or %utl_submit_r64( library(rio); convert('d:xls/xls_sample.xlsx','d:xls/xls_sample.csv'); );
1 REPLY 1
ChrisHemedinger
Community Manager

Hi @rogerjdeangelis,

 

I think people appreciate knowing about all options.  Using SAS to call R functions for utilities like this can be handy for your toolbox, but most SAS users don't have R configured within their SAS environments.  So when providing an answer in these forums, the suggestion to use SAS' integration methods with R is academic -- most people can't apply those techniques in their workplace.  So a pure SAS answer is usually preferred, and is still the most relevant/helpful response that you can provide.

 

For this particular example, SAS has import/export utilities that can do similar work if you have SAS/ACCESS to PC Files (to read the Excel files).  And if you don't have SAS/ACCESS but do have ability to call OS commands (required by R integration methods), then you can achieve the same by using VB Script or PowerShell or Python without needing a specialized R environment.

 

For people who do have R on their SAS environment, the main benefit is the ability to reuse R packages to experiment with methods that others have contributed to the R community, or perhaps to reuse work created by colleagues who use R primarily.  See this demo and discussion from Rick:

 

https://www.youtube.com/watch?v=nmRQ3MtkG6A

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1 reply
  • 841 views
  • 2 likes
  • 2 in conversation