Message-ID: <6DDCCDCC-A3F9-11D8-B41D-000A957CEFBA@math.uni-augsburg.de>
Date: 2004-05-12T11:47:59Z
From: Simon Urbanek
Subject: R_Interactive {was '[Rd] stdout == 'Terminal' or 'File'}
In-Reply-To: <Pine.LNX.4.44.0405120854140.16123-100000@gannet.stats>
while the topic is on, something remotely related although the same:
On May 12, 2004, at 10:04 AM, Prof Brian Ripley wrote:
> interactive() is as good a test as we have, and I think if a better
> test
> is required in the interactive case, the user should be asked.
There may be a little problem in the current sources (talking unix for
now) - R sets the interactive flag like this:
system.c@248: R_Interactive = isatty(0);
Unfortunately right after this there comes:
if (!R_Interactive && SaveAction != SA_SAVE && SaveAction != SA_NOSAVE)
R_Suicide("you must specify `--save', `--no-save' or `--vanilla'");
Now speaking of embedded R - the above leaves (afaik) no way of telling
R to use interactive mode before this suicide attempt if stdout is no
tty (it doesn't have to if the embedding app provides its own
Read/WriteConsole etc.). Any thoughts on this? (btw: aqua uses a hack
to circumvent this... whenever aqua needs a hack it may be worth
thinking about something more general ;))
Cheers,
Simon
---
Simon Urbanek
Department of computer oriented statistics and data analysis
University of Augsburg
Universit?tsstr. 14
86135 Augsburg
Germany
Tel: +49-821-598-2236
Fax: +49-821-598-2200
Simon.Urbanek@Math.Uni-Augsburg.de
http://simon.urbanek.info