Parse                 package:svMisc                 R Documentation

_P_a_r_s_e _a _c_h_a_r_a_c_t_e_r _s_t_r_i_n_g _a_s _i_f _i_t _w_a_s _a _c_o_m_m_a_n_d _e_n_t_e_r_e_d _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:

     Parse R instructions provided as a string and return the
     expression if it is correct, or an object of class 'try-error' if
     it is an incorrect code, or NA if the (last) instruction is
     incomplete.

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

     Parse(text)

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

    text: The character string vector to parse 

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

     Returns an expression with the parsed code or 'NA' if the last
     instruction is correct but incomplete, or an object of
     class'try-error' with the error message if the code is incorrect.

_N_o_t_e:

     On the contrary to 'parse()', 'Parse()' recovers from incorrect
     code and also detects incomplete code or strings.

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

     Philippe Grosjean (phgrosjean@sciviews.org)

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

     'captureAll', 'clipsource'

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

     Parse('1+1')
     Parse('1+1; log(10)')
     # incomplete instruction
     Parse('log(')
     # incomplete string
     Parse('text <- "some text')
     # wrong instruction
     Parse('log)')

