[R] How to run sequential Rscript command for windows command line with a batch file.

nevil amos nevil.amos at gmail.com
Fri Jan 30 05:26:43 CET 2015


Hi,

I need to run multiple iterations of a script to which I am supplying a
single numeric argument


I can open the command prompt window  and enter a single command:
"C:\Program Files\R\R-3.1.0\bin\x64\Rscript.exe" myScript.R.R 18
and it runs OK and saves the outputs.
Similarly if I run the same single command from a batch file  it works fine

however If I have  multiple lines in the batch file  eg:

"C:\Program Files\R\R-3.1.0\bin\x64\Rscript.exe" myScript.R.R 18
"C:\Program Files\R\R-3.1.0\bin\x64\Rscript.exe" myScript.R.R 19
"C:\Program Files\R\R-3.1.0\bin\x64\Rscript.exe" myScript.R.R 20
"C:\Program Files\R\R-3.1.0\bin\x64\Rscript.exe" myScript.R.R 22
"C:\Program Files\R\R-3.1.0\bin\x64\Rscript.exe" myScript.R.R 23
"C:\Program Files\R\R-3.1.0\bin\x64\Rscript.exe" myScript.R.R 24
"C:\Program Files\R\R-3.1.0\bin\x64\Rscript.exe" myScript.R.R 25
"C:\Program Files\R\R-3.1.0\bin\x64\Rscript.exe" myScript.R.R 26
"C:\Program Files\R\R-3.1.0\bin\x64\Rscript.exe" myScript.R.R 27
"C:\Program Files\R\R-3.1.0\bin\x64\Rscript.exe" myScript.R.R 28
"C:\Program Files\R\R-3.1.0\bin\x64\Rscript.exe" myScript.R.R 29
"C:\Program Files\R\R-3.1.0\bin\x64\Rscript.exe" myScript.R.R 30
it pauses after running the first line only.

How do I get all lines in this batch file to run sequentially?

thanks

	[[alternative HTML version deleted]]



More information about the R-help mailing list