deparseOpts               package:base               R Documentation

_O_p_t_i_o_n_s _f_o_r _E_x_p_r_e_s_s_i_o_n _D_e_p_a_r_s_i_n_g

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

     Process the deparsing options for 'deparse', 'dput' and 'dump'.

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

     .deparseOpts(control)

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

 control: character vector of deparsing options.

_D_e_t_a_i_l_s:

     This is called by 'deparse', 'dput' and 'dump' to process their
     'control' argument.

     The 'control' argument is a vector containing zero or more of the
     following strings.  Partial string matching is used.

     '_k_e_e_p_I_n_t_e_g_e_r' Surround integer vectors by 'as.integer()', so they
          are not converted to floating point when re-parsed.

     '_q_u_o_t_e_E_x_p_r_e_s_s_i_o_n_s' Surround expressions with 'quote()', so they
          are not evaluated when re-parsed.

     '_s_h_o_w_A_t_t_r_i_b_u_t_e_s' If the object has attributes (other than a
          'source' attribute), use 'structure()' to display them as
          well as the object value.  This is the default for 'deparse'
          and 'dput'.

     '_u_s_e_S_o_u_r_c_e' If the object has a 'source' attribute, display that
          instead of deparsing the object.  Currently only applies to
          function definitions.

     '_w_a_r_n_I_n_c_o_m_p_l_e_t_e' Some exotic objects such as environments,
          external pointers, etc. can not be deparsed properly.  This
          option causes a warning to be issued if any of those may give
          problems.

     '_a_l_l' An abbreviated way to specify all of the options listed
          above.  May not be used with other options.  This is the
          default for 'dump'.

     '_d_e_l_a_y_P_r_o_m_i_s_e_s' Deparse promises in the form <promise: expression>
          rather than evaluating  them.  The value and the environment
          of the promise will not be shown and the deparsed code cannot
          be sourced.

     For the most readable (but perhaps incomplete) display, use
     'control = NULL'. This displays the object's value, but not its
     attributes.  The default is to display the attributes as well, but
     not to use any of the other options to make the result parseable.

     Using 'control = "all"' comes closest to making 'deparse()' an
     inverse of 'parse()'.  However, not all objects are deparseable
     even with this option.  A warning will be issued if the function
     recognizes that it is being asked to do the impossible.

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

     A numerical value corresponding to the options selected.

