compactList         package:annotationTools         R Documentation

_C_o_n_c_a_t_e_n_a_t_e _l_i_s_t _e_l_e_m_e_n_t_s

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

     Concatenates given elements of a list.

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

     compactList(lst,l)

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

     lst: list object

       l: numeric vector specifying the number of list elements to be
          concatenated sequentially

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

     By definition, the output list is shorter than the input list.

     Function stops if 'sum(l)' does not equal 'lenght(lst)'.

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

    clst: list of length 'length(l)' where the 'i'-th element has
          length 'l[i]' and contains concatenated elements of input
          list 'lst'.

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

     Alexandre Kuhn, alexandre.kuhn@isb-sib.ch

_R_e_f_e_r_e_n_c_e_s:

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

     ##an example list
     lst<-vector('list',3)
     lst[[1]]<-c('aaa','bbb')
     lst[[2]]<-'ccc'
     lst[[3]]<-'zzz'
     ##merge first 2 list elements
     compactList(lst,c(2,1))

