Hi! The R-intro guide states that: "The graphics facilities can be used in both interactive and batch modes,.." but I'm trying both R BATCH commands.file and R --no-save < commands.file and, although I get no errors and the output file with the results is written to disk, I get no graphics. (I want the R function to leave results in a file that a shell script reads and use, and to draw a graphic). Am I missing another option in the command line? Thanks Dr. Agustin Lobo Instituto de Ciencias de la Tierra (CSIC) Lluis Sole Sabaris s/n 08028 Barcelona SPAIN tel 34 93409 5410 fax 34 93411 0012 alobo at ija.csic.es -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> Hi! > > The R-intro guide states that: > "The graphics facilities can be used in both interactive and batch > modes,.." > > but I'm trying both > > R BATCH commands.file > and > R --no-save < commands.filehave a look at the `Rplots.ps' file in the working directory Torsten> > and, although I get no errors and > the output file with the results is > written to disk, I get no graphics. > (I want the R function to leave > results in a file that a shell script > reads and use, and to draw a graphic). > > Am I missing another option in the command line? > > Thanks > > Dr. Agustin Lobo > Instituto de Ciencias de la Tierra (CSIC) > Lluis Sole Sabaris s/n > 08028 Barcelona SPAIN > tel 34 93409 5410 > fax 34 93411 0012 > alobo at ija.csic.es > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On 11.4.2002 14:35 Uhr, Agustin Lobo wrote:> The R-intro guide states that: > "The graphics facilities can be used in both interactive and batch > modes,.." > > but I'm trying both > > R BATCH commands.file > and > R --no-save < commands.file > > and, although I get no errors and > the output file with the results is > written to disk, I get no graphics. > (I want the R function to leave > results in a file that a shell script > reads and use, and to draw a graphic).What kind of graphics file did you try to write? For me, postscript() or pdf() work fine in any situation. [trying to remember past issues on this list] Some other graphics drivers depend on Xwindows to work and, for some reasons, don't work from a batch file. I believe that the driver bitmap() will work in any case, have a look at that. [trying the "obvious"] You did close the graphics device after plotting, didn't you? :-) HTH Kaspar Pflugshaupt -- Kaspar Pflugshaupt Geobotanisches Institut Zuerichbergstr. 38 CH-8044 Zuerich Tel. ++41 1 632 43 19 Fax ++41 1 632 12 15 mailto:pflugshaupt at geobot.umnw.ethz.ch privat:pflugshaupt at mails.ch http://www.geobot.umnw.ethz.ch -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Agustin Lobo wrote:> Hi! > > The R-intro guide states that: > "The graphics facilities can be used in both interactive and batch > modes,.." > > but I'm trying both > > R BATCH commands.file > and > R --no-save < commands.file > > and, although I get no errors and > the output file with the results is > written to disk, I get no graphics. > (I want the R function to leave > results in a file that a shell script > reads and use, and to draw a graphic). > > Am I missing another option in the command line?It works for me. Maybe you have missed to open a device? Example: postscript(file="fig1.ps") plot(1:10) dev.off() postscript(file="fig2.ps") plot(11:20) dev.off() draws two graphics in ps files. I think you can use other devices as well. By, Sven -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._