[R] Windows Batch File

Uwe Ligges ligges at statistik.uni-dortmund.de
Fri Jan 28 13:58:52 CET 2005


Elaine Han wrote:

> Hiya,
> 
> I have read the FAQ for windows and read point 2.10. I setup a dos batch
> file which contains the following line:
> C:\progra~1\R\rw2001\bin\Rterm.exe --vanilla

This line fires up R, but won't accept any file as input...

The FAQ tells you to use
"path_to_R\bin\Rterm.exe --no-restore --no-save < %1 > %1.out 2>&1"
in your batch file.


> I then tried:
> R CMD BATCH --argument myscript.R result.out

What is "--argument"? At least it is superflously here, the rest should 
work given you have set up your environment correctly (path to R)?

Uwe Ligges

> then it started R. I thought by running R CMD BATCH executes R
> non-interactively. I am working on a Windows XP. I tried it on a Mac OSX and
> that worked fine. So I'm not sure what I have done wrong here and have been
> searching the web for solution but to no avail. Please consult.
> 
> I thank you in advance.
> 
> Regards,
> Elaine
>




More information about the R-help mailing list