Re: R-beta: scripting with R?

Friedrich Leisch (Friedrich.Leisch@ci.tuwien.ac.at)
Thu, 7 May 1998 12:57:40 +0200 (CEST)


From: Friedrich Leisch <Friedrich.Leisch@ci.tuwien.ac.at>
Date: Thu, 7 May 1998 12:57:40 +0200 (CEST)
To: Pedro Lima <pedrovl@yahoo.com>
Subject: Re: R-beta: scripting with R?
In-Reply-To: <19980507101240.238.rocketmail@send1d.yahoomail.com>

>>>>> 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 statistic=
s
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 w=
ith
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,

--=20
-------------------------------------------------------------------
                        Friedrich  Leisch                            =20
Institut f=FCr Statistik                      Tel: (+43 1) 58801 4546
Technische Universit=E4t Wien                 Fax: (+43 1)  504 14 98
Wiedner Hauptstra=DFe 8-10/1071      Friedrich.Leisch@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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._