<html>
<font size=3>One way to get these formats (pngs,gifs,jpegs, etc) is to
generate a postscript file under a BATCH and then use some of the unix
tools to convert to PPN(PNM?). Then one can use the PPN(PNM?)TOPNG
type programs to further convert to PNGs, GIFs, etc. This is how
Banfield generates his 'on the fly' images. The only problem I have
found with it is that the image quality is not very good. I have
messed around with the compression arguments to these programs too with
no luck. I'm not sure at what point(s) the image quality
drops. If anyone has any ideas of how to get around this I would be
glad to hear from them. <br>
<br>
At 10:13 AM 10/5/2001 -0400, Liaw, Andy wrote:<br>
>I just try the following on Linux (Mandrake7.1) and it works:<br>
><br>
>file (tryplot.R:<br>
>jpeg("tryplot.jpg")<br>
>plot(rnorm(100))<br>
>dev.off()<br>
><br>
>>From the shell prompt:<br>
>R --no-save < tryplot.R > tryplot.Rout<br>
><br>
>This generated the JPEG file, and dump the R session text to
tryplot.Rout.<br>
><br>
>If I understand correctly, jpeg() will *not* work with R BATCH, since
it<br>
>depends on x11(), and x11() isn't available when run under batch
mode.<br>
><br>
>Andy<br>
><br>
>> -----Original Message-----<br>
>> From: Chris Milkosky
[<a href="mailto:c.milkosky@xpedite.com" eudora="autourl">mailto:c.milkosky@xpedite.com</a>]<br>
>> Sent: Friday, October 05, 2001 9:24 AM<br>
>> To: r-mailing-list<br>
>> Subject: [R] non-interactive R usage...<br>
>> <br>
>> <br>
>> <Newbie alert> Hello all! </Newbie
alert> =)<br>
>> <br>
>> Hi all,<br>
>> <br>
>> First of all, I'm new to R and I'm REALLY REALLY impressed by
<br>
>> it. It's an asset to the open source community. I
can't begin to say<br>
>> how glad I am to have stumbled across it in
freshmeat.net... <br>
>> Kudos to the developers - you've done a great job.<br>
>> <br>
>> OK - my question may be answered by looking through <br>
>> documentation (I did RTFM), but I haven't noticed anything
<br>
>> yet. I think I must<br>
>> just be missing something though.<br>
>> <br>
>> Does R give you the capability to run a script (read as <br>
>> non-interactive) that would perform a statistical task, and
<br>
>> then send output<br>
>> to a file? For example: read a set of data from a file,
<br>
>> generate a JPEG _file_ containing a plot of the data (with
<br>
>> some specific<br>
>> stat calcs plotted of course), and then exit?<br>
>> <br>
>> I do capacity planning and would like to be able to have JPEG
<br>
>> plots of real time statistical data appear on web pages, so
I'm<br>
>> thinking that a CGI can be executed that starts R up, <br>
>> generates a plot, and writes it to a file. We currently
use <br>
>> gnuplot, but with<br>
>> all of the statistical needs we have, it is turning out to be
<br>
>> less flexible than we had hoped.<br>
>> <br>
>> Has this been done before? Could it be? If so, can
we pass <br>
>> command line parameters to our R scripts somehow?<br>
>> <br>
>> Thanks,<br>
>> <br>
>> Chris<br>
>> <br>
>> <br>
>>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.<br>
>> -.-.-.-.-.-.-.-.-<br>
>> r-help mailing list -- Read <br>
>>
<a href="http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html" eudora="autourl">http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html</a><br>
>> Send "info", "help", or
"[un]subscribe"<br>
>> (in the "body", not the subject !) To: <br>
>> r-help-request@stat.math.ethz.ch<br>
>>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.<br>
>> _._._._._._._._._<br>
>> <br>
><br>
>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-<br>
>r-help mailing list -- Read
<a href="http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html" eudora="autourl">http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html</a><br>
>Send "info", "help", or
"[un]subscribe"<br>
>(in the "body", not the subject !) To:
r-help-request@stat.math.ethz.ch<br>
>_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._<br>
</font></html>