Alternatively, use the full path in your call to R as I do below:

"F:\Program Files\R\R-2.4.1pat\bin\R.exe" CMD BATCH --vanilla --slave whatever.R

HTH,

Roger

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gabor 
Grothendieck
Sent: Friday, June 08, 2007 1:51 PM
To: Sébastien Bihorel
Cc: [email protected]
Subject: Re: [R] Batch processing in Windows

R isn't in your path.  Either change your path to include it or place Rcmd.bat 
from batchfiles anywhere in your existing path:

   http://code.google.com/p/batchfiles/

and then:

   Rcmd BATCH ...whatever...


On 6/8/07, Sébastien Bihorel <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am a complete newbe to R, so the following problem will probably be 
> trivial for most of you guys:  I get an error message every time I try 
> to run a R file directly from the DOS shell.
>
> My R file (test.R) is intended to create a basic graph and has a very 
> simple code:
>
> x<-rep(1:10,1)
> y<-rep(1:10,1)
> plot(x,y)
>
> I am using the following command to call this file directly from the 
> c:/
> root:
> C:/>R CMD BATCH e:/Documents Seb/3_/test.R
>
> And here is the error message (Translated from french to english):
> 'R' is not recognized as an internal or external command, an 
> executable script or a command file
>
> My OS is a french Windows XP sp2 and I am using R version 2.5.0. I 
> wonder if the problem comes from an installation problem...
>
> Thank you in advance for your help.
>
> Sebastien
>
> ______________________________________________
> [email protected] 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.
>

______________________________________________
[email protected] 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.

********************************************************************** * 
This message is for the named person's use only. It may 
contain confidential, proprietary or legally privileged 
information. No right to confidential or privileged treatment 
of this message is waived or lost by any error in 
transmission. If you have received this message in error, 
please immediately notify the sender by e-mail, 
delete the message and all copies from your system and destroy 
any hard copies. You must not, directly or indirectly, use, 
disclose, distribute, print or copy any part of this message 
if you are not the intended recipient.

______________________________________________
[email protected] 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.

Reply via email to