invisible                package:base                R Documentation

_C_h_a_n_g_e _t_h_e _P_r_i_n_t _M_o_d_e _t_o _I_n_v_i_s_i_b_l_e

_D_e_s_c_r_i_p_t_i_o_n:

     Return a (temporarily) invisible copy of an object.

_U_s_a_g_e:

     invisible(x)

_A_r_g_u_m_e_n_t_s:

       x: an arbitrary R object.

_D_e_t_a_i_l_s:

     This function can be useful when it is desired to have functions
     return values which can be assigned, but which do not print when
     they are not assigned.

_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:

     'return', 'function'.

_E_x_a_m_p_l_e_s:

     # These functions both return their argument
     f1 <- function(x) x
     f2 <- function(x) invisible(x)
     f1(1)# prints
     f2(1)# does not

