warnings                package:base                R Documentation

_P_r_i_n_t _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:

     'warnings' prints the top-level variable 'last.warning' in a
     pleasing form.

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

     warnings(...)

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

     ...: arguments to be passed to 'cat'.

_R_e_f_e_r_e_n_c_e_s:

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

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

     'warning'.

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

     ow <- options("warn")
     for(w in -1:1) {
        options(warn = w); cat("\n warn =",w,"\n")
        for(i in 1:3) { cat(i,"..\n"); m <- matrix(1:7, 3,4) }
     }
     warnings()
     options(ow) # reset

