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.

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

