withVisible              package:utils              R Documentation

_R_e_t_u_r_n _b_o_t_h _a _v_a_l_u_e _a_n_d _i_t_s _v_i_s_i_b_i_l_i_t_y

_D_e_s_c_r_i_p_t_i_o_n:

     This function evaluates an expression, returning it in a two
     element list containing its value and a flag showing whether it
     would automatically print.

_U_s_a_g_e:

     withVisible(x)

_A_r_g_u_m_e_n_t_s:

       x: An expression to be evaluated. 

_D_e_t_a_i_l_s:

     The argument is evaluated in the caller's context.

_V_a_l_u_e:

  value : The value of 'x' after evaluation.

visible : logical; whether the value would auto-print.

_S_e_e _A_l_s_o:

     'invisible', 'eval'

_E_x_a_m_p_l_e_s:

     x <- 1
     withVisible(x <- 1)
     x
     withVisible(x)

     # Wrap the call in evalq() for special handling

     df <- data.frame(a=1:5, b=1:5)
     evalq(withVisible(a + b), envir=df)

