From Kurt.Hornik@ci.tuwien.ac.at  Thu Aug 21 22:02:06 1997
From: Kurt.Hornik@ci.tuwien.ac.at (Kurt Hornik)
Date: Thu, 21 Aug 1997 23:02:06 +0200
Subject: R-alpha: options [--no-*-file] AND --dont-stop-on-error-if-batch
In-Reply-To: <Pine.SUN.3.95.970812093005.777B-100000@spock>
References: <199708121323.PAA02620@sophie.ethz.ch>
 <Pine.SUN.3.95.970812093005.777B-100000@spock>
Message-ID: <199708212102.XAA03944@aragorn.ci.tuwien.ac.at>

>>>>> Thomas Lumley writes:

> On Tue, 12 Aug 1997, Martin Maechler wrote:
>> 
>> As Thomas Lumley has noted before, the behavior in 'batch mode' has changed;
>> namely "Termination upon 'error'".
>> 
>> I think this is THE good default behavior for "batch mode".
>> However
>> 1) for several purposes I'd very much want an option to change this
>> default behavior.
> Hear, hear!

>> 
>> I think it'd be very neat then if
>> options(error.stop = FALSE)
>> actually translated all errors [stop(.)] to warnings [warning()].
>> 

> I'm not convinced.  Being able to make warnings fatal is a good option,
> but being able to continue after errors may make no sense.   How do you
> continue after subscript out of bounds, or argument missing with no
> default, or memory exhausted or ...

> You may well need to jump back to the top level before it makes sense to
> continue.  On the other hand, once at the top level it is certainly
> possible to proceed, and so there should be an option to do it.

There is an obvious trade-off between having a lot of flexibility and
simple too many options :-)

I am not sure about making warnings fatal.  E.g., code for chisquare
tests usually displays a warning if the approximation may be bad.  That
should never be fatal, though ...

Re termination upon error, couldn't there be situations with a huge
simulation loop where one could still do something useful after
e.g. running out of memory?

If I unterstand Martin correctly, the extra options() come into being
only because command-line options are hard to port to point-and-click
interfaces ...

-k
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel 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-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


R-alpha: options [--no-*-file] AND --dont-stop-on-error-if-batch
Kurt Hornik