07-09-2016 11:23 AM
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'); );
07-09-2016 11:47 AM
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: