[R] About "=" in command line in windows.

Vladimir Eremeev wl2776 at gmail.com
Fri Aug 31 15:52:54 CEST 2007

It seems, I don't understand something, or there is a bug in R.

I have made some experiments after my yesterday post about using "=" with -e
switch to the Rscript.

Now, I've found:

C:\users\wl\trainings\r>rscript --verbose -e "mean(x=1:3)"
  'C:\Program Files\R\bin\Rterm.exe --slave --no-restore -e mean(x=1:3)'

Error in -args : invalid argument to unary operator
Execution halted

C:\users\wl\trainings\r>Rterm --slave --no-restore -e "mean(x=1:3)"

Nothing is printed on the console, but the window appears, saying "R for
Windows terminal front-end has encountered a problem and needs to close. We
are sorry for the inconvenience."

C:\users\wl\trainings\r>rscript --verbose -e "mean(1:3)"
  'C:\Program Files\R\bin\Rterm.exe --slave --no-restore -e mean(1:3)'

[1] 2

C:\users\wl\trainings\r>Rterm.exe --slave --no-restore -e "mean(1:3)"
[1] 2

C:\users\wl\trainings\r>Rterm.exe --slave --no-restore -e 'mean(1:3)'
[1] "mean(1:3)"

Points (1) and (2) don't seem normal to me, however, I don't see, what I am
doing wrong. 
I use windowsXP Pro, my colleague uses windows 2000 and reports the same
My sessionInfo():

> sessionInfo()
R version 2.5.1 Patched (2007-08-19 r42614)


attached base packages:
[1] "stats"     "graphics"  "grDevices" "utils"     "datasets"  "methods"
[7] "base"

View this message in context: http://www.nabble.com/About-%22%3D%22-in-command-line-in-windows.-tf4360278.html#a12426839
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list