

stop {base}                                  R Documentation

_S_t_o_p _F_u_n_c_t_i_o_n _E_x_e_c_u_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n_:

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

_U_s_a_g_e_:

     stop(message)

_A_r_g_u_m_e_n_t_s_:

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

_D_e_t_a_i_l_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_e_e _A_l_s_o_:

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

_E_x_a_m_p_l_e_s_:

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

