restart-deprecated {base} | R Documentation |
Restart an Expression
Description
restart
performs a type of non-local return.
Usage
restart(on = TRUE)
Arguments
on |
if true a jump point is set; if false the jump point is removed. |
Details
When restart
is called with on = TRUE
the evaluator
marks that function as a return point. Any errors or signals
(such as control-C on Unix) cause control to return to the start of
the function containing the call to restart
. The most recently
established function is always entered first.
Note
The direct use of restart
is likely to result in an infinite loop.
Use try
unless you are sure you know what
you are doing.
In fact, as restart
is deprecated, don't use it even if you
are sure you know what you are doing.
See Also
try
for a safer interface.
options
for setting error handlers and suppressing the
printing of error messages.