captureAll              package:svMisc              R Documentation

_R_u_n _a_n _R _e_x_p_r_e_s_s_i_o_n _a_n_d _c_a_p_t_u_r_e _o_u_t_p_u_t _a_n_d _m_e_s_s_a_g_e_s _i_n _a _s_i_m_i_l_a_r _w_a_y
_a_s _i_t _w_o_u_l_d _b_e _d_o_n_e _a_t _t_h_e _c_o_m_m_a_n_d _l_i_n_e

_D_e_s_c_r_i_p_t_i_o_n:

     This function captures results of evaluating an R expression the
     same way as it would be done in a R console. The result is in a
     character string. Errors, warnings and other conditions are
     treated as usual, including the delayed display of the warnings if
     'options(warn = 0)'.

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

     captureAll(expr)

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

    expr: A valid R expression to evaluate 

_V_a_l_u_e:

     Returns a string with the result of the evaluation done in the
     user workspace.

_A_u_t_h_o_r(_s):

     Philippe Grosjean (phgrosjean@sciviews.org)

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

     'Parse', 'clipsource'

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

     writeLines(captureAll(1+1))
     writeLines(captureAll(Parse("search()")))

     ## Not run: 
     writeLines(captureAll(Parse('1:2 + 1:3')))
     writeLines(captureAll(Parse("badname")))
     ## End(Not run)

