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. Thanks, -Brigid [[alternative HTML version deleted]]
Try writing BATCH in upper case. On Fri, Jan 16, 2009 at 10:51 AM, Brigid Mooney <bkmooney at gmail.com> 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. > > Thanks, > -Brigid > > [[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. >
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