[R] Problem with invoking R from the command line (Windows Vista)

Duncan Murdoch murdoch.duncan at gmail.com
Wed Jul 21 19:09:49 CEST 2010


On 21/07/2010 12:55 PM, Camster wrote:
> Dear all
>
> I am running in a problem when trying to run R from Windows command line.
> I am runnning Windows Vista, R-2.10.1. 
>
> I have a script I would like to run remotely from another program. As it did
> not work, I thought I would test the script from the Windows command line
> which highlighted a problem. 
> When I open the command line and type R at the prompt (or any other variant
> (R CMD BATCH, Rgui.exe or Rterm.exe), I get the error message: 
> "'Rscript' is not recognized as an internal or external command,
> operable program or batch file."
>   

This is a sign that your PATH environment variable doesn't include the 
directory RHOME\bin. 


> if I move to the R directory (cd usr\R\R-2.10.1\bin), and try running the
> script ( R < "myscript.R" --vanilla) 
>  it works fine. 
> I thought the problem may come from the environment variables (tried
> specifying explicit location of R.exe), but this did not solve the problem.
> I also re-install R but that did not help either.
>   

You don't say exactly what you tried, but if you tried changing your 
PATH, you should try again, and verify that the change is in place in 
the session where you're trying to run R.

Duncan Murdoch

> I cannot think of anything else. 
> I have read the R installation and rwfaq notes, and look through the posts
> but I cannot find any suggestion on how to fix the bug.
>
> If anyone can suggest anything, that will be much appreciated.
>
> Many thanks
>
> Camille
>
> PS: I am also running R on another machine (Windows XP) and I don't have a
> similar problem!
>
>
>
>



More information about the R-help mailing list