toString                package:base                R Documentation

_t_o_S_t_r_i_n_g _C_o_n_v_e_r_t_s _i_t_s _A_r_g_u_m_e_n_t _t_o _a _C_h_a_r_a_c_t_e_r _S_t_r_i_n_g

_D_e_s_c_r_i_p_t_i_o_n:

     This is a helper function for 'format'. It converts its argument
     to a string. If the argument is a vector then its elements are
     concatenated with a ',' as a separator.  Most methods should honor
     the width argument.

_U_s_a_g_e:

     toString(x, ...)

     ## Default S3 method:
     toString(x, width, ...)

_A_r_g_u_m_e_n_t_s:

       x: The object to be converted.

   width: The returned value has at most 'width' characters. The
          minimum value accepted is 6 and smaller values are taken as
          6.

     ...: Optional arguments for methods.

_D_e_t_a_i_l_s:

     The default method returns the first 'width - 4' characters of the
     result with '....' appended, if the full result would use more
     than 'width' characters.

_V_a_l_u_e:

     A character vector of length 1 is returned.

_A_u_t_h_o_r(_s):

     Robert Gentleman

_S_e_e _A_l_s_o:

     'format'

_E_x_a_m_p_l_e_s:

     x <- c("a", "b", "aaaaaaaaaaa")
     toString(x)
     toString(x, width=8)

