R-beta: scripting with R?

Friedrich Leisch Friedrich.Leisch at ci.tuwien.ac.at
Thu May 7 12:57:40 CEST 1998


>>>>> On Thu, 7 May 1998 03:12:40 -0700 (PDT),
>>>>> Pedro Lima (PL) wrote:

PL> I've been playing with R for a while using emacs ESS. I've started to
PL> like it a
PL> lot ( the beautiful S language was unknown to me before I dumped into R)

PL> I want to make some scripts to automate the display of some statistics
PL> on web pages. I started to look for ways of using R in a scripting
PL> environment
PL>  but I could not find information on this. Is there a way to call R with
PL> command prompt arguments, like a file with a session?

Yes, you simply have to redirect the input of R from stdin to a file,
i.e.,

	R [--save|--no-save] < cmdfile

reads the commands in cmdfile as if they were typed at the prompt. You
have to specify --save or --no-save, stating wether the environment
should be saved to the .RData file upon exiting.

Best,

-- 
-------------------------------------------------------------------
                        Friedrich  Leisch                             
Institut für Statistik                      Tel: (+43 1) 58801 4546
Technische Universität Wien                 Fax: (+43 1)  504 14 98
Wiedner Hauptstraße 8-10/1071      Friedrich.Leisch at ci.tuwien.ac.at
A-1040 Wien, Austria             http://www.ci.tuwien.ac.at/~leisch
     PGP public key http://www.ci.tuwien.ac.at/~leisch/pgp.key
-------------------------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list