[R] Runnin R prorams from a command line

Uwe Ligges ligges at statistik.uni-dortmund.de
Mon Sep 30 09:02:28 CEST 2002


John Fox wrote:
> 
> Dear Ari,
> 
> At 12:58 PM 9/29/2002 -0400, Ari J Russo wrote:
> >Hello, I am a new R user, using version 1.5.1.  I am
> >attempting to run R programs from a dos command line
> >(in win2000) and am having problems. My goal is to
> >be able to use R from batch scripts in both windows
> >and also in Linux eventually later.
> >
> >When I first ran "rcmd BATCH --help" it said that
> >perl was not found.  after installing perl and
> >running again, I received the following error:
> >
> >C:\Program Files\R\rw1051\bin>rcmd BATCH -h
> >Can't locate R/Utils.pm in @INC (@INC contains:
> >C:\PROGRA~1\R\rw1051\share\per
> >C:/ActivePerl/Perl/lib C:/ActivePerl/Perl/site/lib
> >.) at C:\PROGRA~1\R\rw1051/
> >n/BATCH line 22.
> >BEGIN failed--compilation aborted at
> >C:\PROGRA~1\R\rw1051/bin/BATCH line 22.
> 
> The program to use is rterm.exe, not rcmd.exe. To run rterm with file
> input, enter
>          Rterm.exe --no-restore --no-save < input-file > output-file
> at the DOS prompt (where, of course, input-file and output-file represent
> the files with your input and to hold your output). For more information,
> see the README and README.Rterm files in the main R directory.

Well, the "Rcmd BATCH" approach should work as well, if all required
utilities are installed.
Obviously te file ....\share\perl\R\Utils.pm  was not found.

I'd suggest to follow the instructions for building R on Windows to get
all required tools and all paths set correctly. It is important to have
the source part (from the Windows installer, if you haven't compile
yourself) of R installed on your machine.

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list