[R] Sas to R

David Winsemius dwinsemius at comcast.net
Wed Sep 15 20:06:06 CEST 2010


On Sep 15, 2010, at 1:44 PM, Sarah Jilani wrote:

> Hi,
>
> I need to call an R program from Sas. I have tried using the  
> following code
> in Sas using the x command but it just calls up dos and says

I went searching for a worked example and found this:

http://www.nesug.org/proceedings/nesug08/sa/sa07.pdf

Those of us with a preference for R are likely to be either amused (or  
mildly offended) by statements like ..."Data manipulation is much  
easier in SAS..." but at least the author recognizes the superiority  
of graphics and time series analysis features.

> 'D:\Program' is not recognized as an internal or external command,  
> operable
> program or batch file.
> ]
> SAS CODE:
>
> options xwait xsync;
>
> %let Rsource=S:\EPI_Data\Communicable Diseases\DR1355 Historic  
> Communicable
> Disease Analaysis\R graphics;
>
> options xwait xsync;
>
> x '"D:\Program Files\R\R-2.9.2\bin\Rgui.exe" --no-save --quiet

As I suspected the program example  did not call Rgui.exe, but rather  
R.exe


-- 
David.
> <""&rsource.\Rtest.R""> ""&rsource.\Rtest.log""';
>
> What I need it to do is call R, run an R program and then go back to  
> running
> sas. Any ideas on how to do that?
>
> Thanks!
>
> Sarah
>
> -- 
> ---
> Sarah Jilani
> (317) 979 2830
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list