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.

