sequence package:base R Documentation _C_r_e_a_t_e _A _V_e_c_t_o_r _o_f _S_e_q_u_e_n_c_e_s _D_e_s_c_r_i_p_t_i_o_n: For each element of 'nvec' the sequence 'seq_len(nvec[i])' is created. These are concatenated and the result returned. _U_s_a_g_e: sequence(nvec) _A_r_g_u_m_e_n_t_s: nvec: a non-negative integer vector each element of which specifies the end point of a sequence. _D_e_t_a_i_l_s: Earlier versions of 'sequence' used to work for 0 or negative inputs as 'seq(x) == 1:x'. Note that 'sequence <- function(nvec) unlist(lapply(nvec, seq_len))' and it mainly exists in reverence to the very early history of R. _S_e_e _A_l_s_o: 'gl', 'seq', 'rep'. _E_x_a_m_p_l_e_s: sequence(c(3,2))# the concatenated sequences 1:3 and 1:2. #> [1] 1 2 3 1 2