[R] Missing file to run Rcmd batch on Windows

Duncan Murdoch murdoch at stats.uwo.ca
Fri Jan 16 17:02:52 CET 2009


On 1/16/2009 10:51 AM, Brigid Mooney wrote:
> Hi,
> 
> I'm trying to run an R script using Rcmd Batch from the command line on a
> Windows Vista machine.  I am using R version 2.8.1.
> 
> I installed the batch files 4-3 found at
> http://cran.r-project.org/contrib/extra/batchfiles/ and added them to my
> path.
> I also had to install the latest version of perl (it's Strawberry perl if
> that makes a difference) and have added this to my path.
> 
> Now when I run the command: Rcmd batch TestBatch.R TestOutput.txt from the
> command line, I get the error:
> 
> Can't open perl script "C:\Progra~1\R\R-28~1.0\bin\batch": No such file or
> directory
> 
> Just for reference, TestBatch.R contains only one line: print("hello world")
> 
> Does anyone have any idea on what this file is that I might be missing?  Or
> is there some other mistake I'm making in trying to run the a script from
> the command line.

Rcmd runs some commands based on internal matches to the name, and if 
not found there, it looks in the file system.  So there is no internal 
command "batch", and no external command of that name either.

The actual name (as Rcmd --help will tell you) is "BATCH", and it is 
implemented as an internal command, so case matters.

Duncan Murdoch




More information about the R-help mailing list