

   stop {base}                                  R Documentation

   SSttoopp FFuunnccttiioonn EExxeeccuuttiioonn

   DDeessccrriippttiioonn::

        `stop' stops execution of the current expression,
        prints the message given as its argument, then executes
        an error action.

   UUssaaggee::

        stop(message)

   AArrgguummeennttss::

    message: a character vector (of length 1) or `NULL'.

   DDeettaaiillss::

        The error action is controlled by the current error
        handler set by `options(error=)'. The default behaviour
        (the `NULL' error-handler) in interactive use is to
        return to the top level prompt, and in non-interactive
        use to (effectively) call `q("no", status=1, run-
        Last=FALSE').

   SSeeee AAllssoo::

        `warning', `restart' to catch errors and retry, and
        `options' for setting error handlers.

   EExxaammpplleess::

        if(iter > 10) stop("too many iterations")

