warning                 package:base                 R Documentation

_W_a_r_n_i_n_g _M_e_s_s_a_g_e_s

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

     Generates a warning message that corresponds to its argument and
     the expression or function from which it was called.

_U_s_a_g_e:

     warning(message)

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

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

_D_e_t_a_i_l_s:

     The result depends on the value of `options("warn")'.

     If `warn' is negative warnings are ignored; if it is zero they are
     stored and printed after the top-level function has completed; if
     it is one they are printed as they occur and if it is 2 (or
     larger) warnings are turned into errors.

     If `warn' is zero (the default), a top-level variable
     `last.warning' is created.  It contains the warnings which can be
     printed via a call to `warnings'.

_S_e_e _A_l_s_o:

     `stop' for fatal errors, `warnings', and `options(warn=..)'.

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

