[R] plots from batchfile on windows

From: Hans-Peter <gchappi_at_gmail.com>
Date: Sat 04 Jun 2005 - 00:28:29 EST


On windows I'd like to run a batchfile that leaves me a plot. As a test I have the scriptfile "test.r" which only contains:

    x <- 1:10;
    y <- sample( 10 )
    plot( x, y )

Now I tried the following (but nothing worked):

  1. "R --vanilla < test.r" in the cmd window, => that doesn't give me a plot
  2. the same, but I added "bitmap(file="outplot.png")" in the scriptfile => Here I get an error that gswin32c.exe was not found. (Maybe I need to install ghostscript???)
  3. some attempts with Rgui.exe => I didn't arrive to pass a command argument.

It would be nice, to get some hints, how this could be done. I did search the newsgroup archive, but unfortunately didn't find something.

Thanks and best regards,

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jun 04 00:41:32 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:22 EST