interactive()
TRUE if the input to S-PLUS is an interactive
terminal,
FALSE if it is not.
Use
interactive to prevent inappropriate
execution.
For example, the
menu and
browser functions
only work when executed interactively.
interactive is
TRUE if and only if both the standard input
and standard error file descriptors are terminals
(as determined by the isatty system routine).
This is not foolproof.
if(!interactive()) stop("must be interactive")