[R] Sas to R

Erik Iverson eriki at ccbr.umn.edu
Wed Sep 15 19:51:33 CEST 2010


Sarah,

This is a SAS question, not R.  However, it seems clear that it
has something to do with the fact that there are spaces in the
command that you're sending to Windows.

Maybe try calling with the 'short directory name' notation,
I forget what that's called in Windows.

Or else follow-up on a SAS list?

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
> '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
> <""&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
>



More information about the R-help mailing list