seqToHumanReadable          package:R.utils          R Documentation

_G_e_t_s _a _s_h_o_r_t _h_u_m_a_n _r_e_a_d_a_b_l_e _s_t_r_i_n_g _r_e_p_r_e_s_e_n_t_a_t_i_o_n _o_f _a_n _v_e_c_t_o_r _o_f _i_n_d_i_c_e_s

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

     Gets a short human readable string representation of an vector of
     indices.

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

     ## Default S3 method:
     seqToHumanReadable(idx, delimiter="-", collapse=", ", ...)

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

     idx: A 'vector' of 'integer' indices.

delimiter: A 'character' string delimiter.

collapse: A 'character' string used to collapse subsequences.

     ...: Not used.

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

     Henrik Bengtsson (<URL: http://www.braju.com/R/>)

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

       print(seqToHumanReadable(1:10))  # "1-10"
       print(seqToHumanReadable(c(1:10, 15:18, 20)))  # "1-10, 15-18, 20"

