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:

