Helena Shevchuk
2002-Aug-15 00:40 UTC
[R] How to run R to generate graphics (jpeg) files dynamically ?
Hello. I am getting started with R system and I have a question: I'd like to use R system to generate some graphics (jpeg) files dynamically from command line or perl script (like: > Rgui -input_r_file <file>.r -output_jpeg_file <file>.jpeg) 1) How should I invoke R to read the data from external file. 2) How should I invoke R to run statements from external *.r file. 3) How should I invoke R to save processed data as jpeg file. Thanks a lot. Helena. _________________________________________________________________ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Ko-Kang Kevin Wang
2002-Aug-15 03:13 UTC
[R] How to run R to generate graphics (jpeg) files dynamically ?
> > From: "Helena Shevchuk" <helena_shevchuk at hotmail.com> > Date: 2002/08/15 Thu PM 12:40:41 GMT+12:00 > To: R-help at stat.math.ethz.ch > Subject: [R] How to run R to generate graphics (jpeg) files dynamically ? > > > Hello. > I am getting started with R system and I have a question: > > I'd like to use R system to generate some graphics (jpeg) files dynamically > from > command line or perl script (like: > Rgui -input_r_file <file>.r > -output_jpeg_file <file>.jpeg) > > 1) How should I invoke R to read the data from external file. > 2) How should I invoke R to run statements from external *.r file.Do you want to call the external files within R? If so: source("foo.R") will do as long as you set the working directory to be the directory with "foo.R". If you want to invoke in batch mode, then depending on your platform (from your description on Rgui, I take it you're on Windows), you will do: Rcmd BATCH foo.R it will then run all the commands in foo.R and save the output in foo.Rout.> 3) How should I invoke R to save processed data as jpeg file.What do you mean by processed data? If you meant "graphs", then take a look at: ?jpeg if you mean all the commands and their results, they will be stored (if you run in BATCH mode) in *.Rout, which is plain ASCII file. ----------------------------------- Ko-Kang Kevin Wang Statistical Analysis Division Leader Software Developers' Klub (SDK) University of Auckland New Zealand -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
ripley@stats.ox.ac.uk
2002-Aug-15 06:23 UTC
[R] How to run R to generate graphics (jpeg) files dynamically ?
Please read the rw-FAQ Q2.9. You want to use rterm --no-save < input.R and to open a jpeg() device in input.R. You cannot use Rgui. The answer here depends on the platform in use: you are using Windows, and neglected to tell us. On Wed, 14 Aug 2002, Helena Shevchuk wrote:> > Hello. > I am getting started with R system and I have a question: > > I'd like to use R system to generate some graphics (jpeg) files dynamically > from > command line or perl script (like: > Rgui -input_r_file <file>.r > -output_jpeg_file <file>.jpeg) > > 1) How should I invoke R to read the data from external file.There's a whole R manual on that: see the Help menu in Rgui.> 2) How should I invoke R to run statements from external *.r file. > 3) How should I invoke R to save processed data as jpeg file.Answered above. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._