Hi, I am wondering how to pop up the graphics window from Rscript. I run the following code, but I don't see the graphics window, even transiently. Regards, Peng $ Rscript plot.R> x=1:10 > y=1:10 > plot(x,y) >
RIOS,ALFREDO ARTURO
2009-Sep-06 16:59 UTC
[R] How to pop up the graphics window from Rscript?
maybe windows() On Sun Sep 06 12:53:14 EDT 2009, Peng Yu <pengyu.ut at gmail.com> wrote:> Hi, > > I am wondering how to pop up the graphics window from Rscript. I > run > the following code, but I don't see the graphics window, even > transiently. > > Regards, > Peng > > $ Rscript plot.R >> x=1:10 >> y=1:10 >> plot(x,y) >> > > ______________________________________________ > R-help at r-project.org 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. > >-- RIOS,ALFREDO ARTURO
Gabor Grothendieck
2009-Sep-06 17:42 UTC
[R] How to pop up the graphics window from Rscript?
Try this (contents of plot.R): png("mygraphic.png") plot(1:10) dev.off() browseURL("mygraphic.png") It will pop up the graphic in a browser window. On Sun, Sep 6, 2009 at 12:53 PM, Peng Yu<pengyu.ut at gmail.com> wrote:> Hi, > > I am wondering how to pop up the graphics window from Rscript. I run > the following code, but I don't see the graphics window, even > transiently. > > Regards, > Peng > > $ Rscript plot.R >> x=1:10 >> y=1:10 >> plot(x,y) >> > > ______________________________________________ > R-help at r-project.org 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. >
Reasonably Related Threads
- How to wait for a user response in Rscript?
- How to not to terminate read.table if the input file is empty?
- Why I get this error? Error in close.connection(f) : invalid connection
- How to convert a string passed as an argument to a vector?
- Why this statement does not print anything in an if-statement that includes 'q()'?