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

Martin Maechler Martin Maechler <maechler@stat.math.ethz.ch>
Tue, 12 Aug 1997 15:23:13 +0200


>>>>> "Kurt" == Kurt Hornik <hornik@ci.tuwien.ac.at> writes:

    Kurt> Not really important, but ... `make tests' fails if a user's
    Kurt> .Rprofile asks for libraries which are not found by the binary in
    Kurt> the compilation tree (yes I know, we're here perhaps the only
    Kurt> ones who use private libraries ...).

    Kurt> Perhaps we should have options
    Kurt>  --no-site-file
    Kurt>  --no-init-file
    Kurt> which inhibit the loading of a global and a user's init file?

Yes, this (or something similar, maybe also allowing "-q" as short form)
would be useful!


For me even more important, is an option such as
	--dont-stop-on-error-if-batch

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.
 2) S-plus behaves differently, i.e., just continues evaluation after
    telling about the error, both in  "Splus BATCH .." and "Splus < file" mode.

Instead of the above switch ((which is hard to port to point'n'click
			      Win or Mac versions))
we could have something as

	options(error.stop = FALSE)

whereas the default was

	options(error.stop = TRUE)

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

The above option may come handy even in NON-BATCH mode,
e.g. when minimizing functions that produce NA from time to time or similar
things, and you are running large loops of simulations...


Just for the sake of completeness, the following is somewhat related to the
above discussion and  has been part of the TASKS for a while :
----------------------------------------------------------------------
TASK:	warnings option
STATUS:	Open
FROM:	maechler@stat.math.ethz.ch
	which reminds me that we/I also would like something similar as S's
	options(warn = k)
	k=  0 : [default]  print warnings
	k= -1 :	do nothing (maybe append warnings to some temp-file)
	k=  1 : produce an error ('warning' becomes 'stop'). 

----------------------------------------------------------------------


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