Re: R-beta: scripting with R?

Friedrich Leisch (
Thu, 7 May 1998 12:57:40 +0200 (CEST)

From: Friedrich Leisch <>
Date: Thu, 7 May 1998 12:57:40 +0200 (CEST)
To: Pedro Lima <>
Subject: Re: R-beta: scripting with R?
In-Reply-To: <>

>>>>> 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=

PL> I want to make some scripts to automate the display of some statistic=
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=
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,

	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.


                        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
A-1040 Wien, Austria   
     PGP public key

r-help mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: