[R] Graphics after invoking R from the command line

Mithun Jacob mithunjacob at gmail.com
Wed Nov 28 18:05:39 CET 2007


I've tried running graphics commands like plot by invoking R at the
command line but the graphics window does not appear. I'm using
R-2.6.0 on Windows XP and am using the cmd shell. Here's a sample
session:

R --slave --save --file=-
x<-c(1,2,3,4)
plot(x,x)

This leads to nothing. I've found a way around it, but the graph
window is frozen and commands to it have to be sent twice for the data
to appear.

R --slave --save --file=-
x<-c(1,2,3,4)
windows()
plot(x,x)
plot(x,x)

Am I doing something wrong here? It would be nice if I could display a
graphics window which isn't frozen.

Regards,
Mithun



More information about the R-help mailing list