DATA Step, Macro, Functions and more

Are these an unacceptable solutions to a SAS problem?

Valued Guide
Posts: 505

Are these an unacceptable solutions to a SAS problem?

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'); );
Community Manager
Posts: 2,763

Re: Are these an unacceptable solutions to a SAS problem?

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:

Rick Wicklin, Principal Research Statistician, introduces SAS/IML and shows how to access R packages. Recorded live at SAS Global Forum 2014. To learn more about SAS/IML, visit
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation